Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

no one?

Last updated 2 years ago.
0

Have you found a solution to this? I'm not sure if I'm following you but have you try doing "cascade"?

e.g. This will delete the record on the pivot table if you delete the item on "tags" table. $table->foreign('tag_id') ->references('id')->on('tags') ->onDelete('cascade');

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.