Laravel Has Many: Delete Parent What Happens with Children
There are many ways how to deal with deleting the records that are in a relationship. In this video, I will show the default behavior, and how we can change it in Laravel validation, in migrations, or with softdeletes. 00:34 Default delete behavior: where that error comes from 01:13 Backend validation: proper error message 02:05 Frontend validation: do not show Delete button 04:04 MySQL theory of onDelete(): Restrict, Cascade or Set Null 05:04 OnDelete Cascade: deleting children entries with
|
|