Closed solingenn closed 2 years ago
Hey,
instead of returning the collection/paginator directly you should use an API resource class to explicitly transform your model to JSON. https://laravel.com/docs/9.x/eloquent-resources
Ok, I'll try that. Thanks.
This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days
`Collection is returning all translations and I don't know how to filter it using **laravel-translatable**. I have tried using
translation('en'), translatedIn('en')` methods and they don't work.This is JSON repsonse of collection:
How can I filter this collection to return just specified collection?