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
When I call the search function, I get a response back just fine as json to my own frontend, but it's not wrapped and I can't get it to wrap.
If I call a "regular" Data class that collects, for example, models (e.g. UserData::collect($users->paginate(10)); or UserData::from(User::find(1)); then it's wrapped in a 'data' key as expected.
If I manually call the wrap method, e.g. EndpointData::collect($results)->wrap('data'); then I only get a response of
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.
-
Couldn't find a similar issue so created this one. I am confused about how the wrapping works in a particular instance. Take the following code:
When I call the search function, I get a response back just fine as json to my own frontend, but it's not wrapped and I can't get it to wrap.
If I call a "regular" Data class that collects, for example, models (e.g.
UserData::collect($users->paginate(10));
orUserData::from(User::find(1));
then it's wrapped in a 'data' key as expected.If I manually call the
wrap
method, e.g.EndpointData::collect($results)->wrap('data');
then I only get a response of[ "data" ]
I'm not sure where to begin!
Beta Was this translation helpful? Give feedback.
All reactions