vendredi 18 mai 2018

laravel add relation only if it not still exists

In my update routine I want to add a relation to an object but only if the same relation is not already present. I have a one to many relationship in my model.

How can I implement this?

I am using Laravel 5.6



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire