Im trying to simply get a tree back from eloquent.
Windows::with('event.action');
returns all actions, regardless of the window id.
How can I specify the the window id used to get transactions back for a specific window?
Currently all actions for an event are returned as the window_id column is being ignored.
Ive tried adding -withPivot on my relationship inside the events model. I have also tried putting in a closure on the with(['events.actions'=>function($q( {.etc..}]) but this is no use because I dont have access to the window id in the closure scope.
window
id
name
events_windows
window_id
event_id
event
id
name
actions_events
window_id
event_id
action_id
action
id
name
transition
id
name
Any ideas?
Cheers, Tom
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community