Closed mrezauli closed 1 year ago
Hi @mrezauli,
The issue is that an associate()
method is not really possible for BelongsToThrough
relationships. Consider the example from the README: https://github.com/staudenmeir/belongs-to-through#usage
You can't call $post->country()->associate($country)
because Post
and Country
aren't related directly – only through User
. So you can only associate a User
to a Post
, but that's just a normal BelongsTo
relationship.
Do you know what I mean?
It would be best if Znck\Eloquent\Relations\BelongsToThrough::associate() method is implemented just like Laravel's native BelongsTo::associate()