You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and noticed that it isn't being data wrapped that is because if resource defines a data key it will ignore the wrapping as per the docs
However I would argue that maybe it should be wrapped in 'data' when there are more then one keys returned in the resource.
Unfortunately I cannot just add a wrapping data key in the resource because that messes up the structure when it comes to pagination/collection. So the workaround for now is:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created resource for the built in DatabaseNotification
and noticed that it isn't being data wrapped that is because if resource defines a data key it will ignore the wrapping as per the docs
However I would argue that maybe it should be wrapped in
'data'
when there are more then one keys returned in the resource.framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php
Line 84 in 53a9850
Unfortunately I cannot just add a wrapping data key in the resource because that messes up the structure when it comes to pagination/collection. So the workaround for now is:
Related:
Beta Was this translation helpful? Give feedback.
All reactions