-
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger model events on nested mutation delete of belongsTo relationships #2588
base: master
Are you sure you want to change the base?
Trigger model events on nested mutation delete of belongsTo relationships #2588
Conversation
This would probably also apply to |
True, but thats just the case for |
Would it be simpler to let Laravel handle the fetching by using |
I think thats not possible for |
I just stumbled across an edgecase pitfall of
public function verifiedUsers () : BelongsTo
{
return $this->belongsTo( User::class )->onlyVerified();
} ... it will not be respected since it is a) lost when calling |
@spawnia Any thoughts? I would like to solve this. |
Changes
When deleting a model using a nested belongs to relation, the model will now be queried and then deleted. This ensures model events to be triggered.
Breaking changes
None.