First of all, API resources (or so called "Transformers") are great! Highly recommend them for API.
Yes, you are right, if you return the data from the repository (or even model) to response, Laravel will automatically transform it to JSON, so basically you have the functionality already.
But, API resources are more than that. You get to control what is returned in your API response, and how its returned. In other words you get to control, what the user will see. And all of that in one place. One class. This is very imporant.
Let me share with u few examples from experience. For reference, if not using API resources i will refer as "default way".
- Date formatting. You don't need to format dates when using them within the code, but when user sees them, they probably need to be formated.
- Timezones. You may not need to transform dates(datetimes) when using them within the code, but when user sees them, they probably need to be transformed into timezone.
- Encodings, other formatings, stuff like that, that you only need for user representation.
- Relations. With the default way (not using API resources), i think that every loaded relation will also be included in your response. This is not ideal. The response might get heavy this way and you will be returning data that is not needed in the response. Plus now you need to hide columns for them (if any).
- Nested resources. However, if you do need to return a relation (as nested object) in your response, you can easily control this with API resources. You can define which ones should be included and even use their API resources to transform them.
- If you want to add some additional info in the response, that the model does not have. For example statistics array for the user.
Now, you may say that, all of this can be done without the API resources, and yes, it can be done. But, it will be done (coded) in different places in the code (different classes maybe). For me, personally, that might not be ideal in terms of organization of code or debugging.
How would API resources fit in your setup? Well i would recommend implementing them in the API controller. That way, they won't affect any business logic and they will be used only for API response.
At the company where I work, we've been using API resources for few years now, and they've been really helpful.
Hope this helps. Let me know if you have more questions.