In some previous versions of Laravel, it was possible to use a feature called Fractal, to dealing with JSON web API, but with this new version of Laravel we have the Resources feature, a very powerful tool to dealing with JSON web API.
In this section, we'll see how we can use the Resources feature, so that we can get the most out of our API. A Resource class is a way to transform data from one format to another.
When dealing with resources and transforming them into responses for the client, we basically have two types: an item and a collection. An item resource, as you might have guessed, is basically a one-to-one representation of our model, whereas a collection is the representation of many items. Collections may also have metadata and other navigation information, as we will see later in this section.