I've been using model events to delete related records. For example, if a
post model is deleted, I'd use
deleting model event to delete all the comments on the post. It works fine.
I now discovered
onDelete('cascade') ; which I can define in my migrations.
I'm wondering if having database handle record deletion is better approach over using model events?
What's your take?
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.