Level 75
Pretty good stackoverflow post here http://stackoverflow.com/questions/14174070/automatically-deleting-related-rows-in-laravel-eloquent-orm
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, let's say I have 3 tables
and a table for relations:
This is the kind of structure shown in laravel documentation.
Correct me if i'm wrong: the taggable_id field is not a real foreign key field. Thus, how is the record supposed to be deleted since it can't benefit from cascade delete ? Should we do it manually ?
Please or to participate in this conversation.