Replies: 2 comments 5 replies
-
This is the default since it follows JSON:API spec and Laravel Resource defaults, why not disable wrapping in data and then wrap the whole thing within your controller in an array with data? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@rubenvanassche As zigi05 already mentioned, in Laravel nested resources aren't wrapped by default. Is there a possibility to disable this behavior? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I disable wrapping on a nested collection in the following situation, when I have global wrapping enabled?
So, from a controller I get json like this, but I don't want to have "data" after "posts":
Beta Was this translation helpful? Give feedback.
All reactions