mercredi 28 septembre 2016

Two relationships to the same table in Laravel 5.3

I build an application with Laravel which is new for me and got stuck at the model definition.
I have two tables USERS and ACTIONS.

1) A User can create an "action" or many actions.
2) A user can also be a member of an action that was created by another user.

So if i'm not wrong , the first relation is ONE-TO-MANY relationship ( A user can create many actions, and one action can only be created by one user ) and the second is many to many ( many users can be member of many actions )

I don't know if laravel allow this, or maybe i'm missing something

Thanks to all of you



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

Aucun commentaire:

Enregistrer un commentaire