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
Is something like this possible with LaravelData? I have tried a bunch of different ways to try to get this to work with no luck. The only one I haven't tried is #[Computed] which I wasn't keen on doing since it really makes the Data class hard to read.
Generally speaking, I only want this for the resource side of things for my SPA to consume, as the sub relationship data are updated with their own endpoints independently.
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.
-
With Laravel Resources, I was able to do something like:
Is something like this possible with LaravelData? I have tried a bunch of different ways to try to get this to work with no luck. The only one I haven't tried is
#[Computed]
which I wasn't keen on doing since it really makes the Data class hard to read.Generally speaking, I only want this for the resource side of things for my SPA to consume, as the sub relationship data are updated with their own endpoints independently.
Beta Was this translation helpful? Give feedback.
All reactions