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
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.
-
Hi,
I am looking for a way to setup some models within the context of a relationship after they get loaded by Eloquent.
Basically we have some circular relationships that Eloquent needs to be told about manually.
Something like that would be great:
Where the
prepareModels
callback would be run on each related model after it gets retrieved from the database.DB schema looks like that:
(and I am not looking for advice regarding how to change that DB schema)
Do we have anything like that in Eloquent relationships?
Beta Was this translation helpful? Give feedback.
All reactions