Laravel Community Tools by
Tighten
Laravel Versions
PHP Releases
Nova Packages
Laravel Tricks
Forge Recipes
Toggle navigation
Log in
Log in
robjmills
Joined:
12 years ago
Total tricks:
1
Last trick:
12 years ago
Submitted tricks
Eloquent
Cascading deletes with model events
If you're not making use of MySQL InnoDB cascades, you might still want to cause events (such as deleting) on related models to cascade. The example below listens for the deleted event on the Product model and cascades this to the child models.
robjmills
12 years ago
34856
4.0
events