Methods 'only' in JsonResource #35960
Unanswered
danilopinotti
asked this question in
Ideas
Replies: 1 comment
-
JsonResource is for make unified JSON response, if you want to use dynamic/filter field it's better not using that, just use from eloquent directly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes I need to filter which fields my API will return, but, I'm using JSON Resources and I don't find any 'short way' to filter these fields.
What do you think about the "only" method in JsonResource?
Example:
Beta Was this translation helpful? Give feedback.
All reactions