Is there a way to use DTO instead of Eloquent model as record in Resources?
At the moment the whole model with every field available is exposed into the front-end. Is there a way to limit the exposure by using DTO or any other method to just sent filtered array with data for the display that's actually needed?
2 Replies
You can reduce fields by using
->select()
on the query, but I think that’s it.I will try, might work thanks 🙂