Delete a parent record and its associated child records
Delete a parent record and its associated child records from a many-to-many relationship without encountering a MySQL foreign key constraint violation (without using the cascadeOnDelete ) iwant to do it manually
1 Reply
Create a ModelObserver see : https://laravel.com/docs/10.x/eloquent#events
And in the event
deleting
remove all child records