vendredi 5 février 2016

How to delete records with pivots (Laravel 5)

So for example if I have tables:

project

user_project

And I want to delete some project from project table and all record in user_project table related to that project, how can I do that? Can I do that in single line? Because I don't want to some project be delted but in user_project to still exists...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1NTXcd5
via IFTTT

Aucun commentaire:

Enregistrer un commentaire