In this tutorial, we will install PHP League's Fractal and write helper methods to transform models into arrays which can be turned into JSON. Fractal also formats the array using JSON API standard https://jsonapi.org. It can also load related objects in one request. In this project, we will use Lumen as our code base.