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
It's supposed to be like this. morphTo relationships are treated as the belongsTo side of the relationship. morphOne/morphMany relationships are treated as the hasOne/hasMany side of the relationship.
The belongsTo side of the relationship does not have the save()/create() methods. It has the associate() method. Only the hasOne/hasMany side of the relationship has the save/create methods.
When I try to perform
save()
orcreate()
onmorphTo
relation of myUser
model. It always gives this error:Where as if I do the reverse, i.e., If I perform
save()
orcreate()
frommorphOne
relation of myAdmin
model. It works perfectly.Is this a bug? or is it suppose to be like this?
The text was updated successfully, but these errors were encountered: