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 creating a model using a belongsTo factory relationship, there is the capability to use magic methods to explicitly define the relationship that we want to use.
Currently this only works by passing an array of state:
This would be useful for developers who are using the "magic method" approach who have multiple relationships for the same model, for example createdBy(User $user) and updatedBy(User $user)
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.
-
When creating a model using a
belongsTo
factory relationship, there is the capability to use magic methods to explicitly define the relationship that we want to use.Currently this only works by passing an array of state:
However, it would be great to also accept an instance of the parent model:
This would be useful for developers who are using the "magic method" approach who have multiple relationships for the same model, for example
createdBy(User $user)
andupdatedBy(User $user)
Beta Was this translation helpful? Give feedback.
All reactions