F
Filament10mo ago
Sdeev

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
Tieme
Tieme10mo ago
Create a ModelObserver see : https://laravel.com/docs/10.x/eloquent#events And in the event deleting remove all child records
Want results from more Discord servers?
Add your server