I'm working on my first Laravel project using v5.3, and I'm stuck on the best way to implement a Many to Many relationship where the link/pivot table has a one to many relationship to another table.
So an example would be user >-(group_user)-< group, but group_user -< type.
I have all of the tables built and seeded but I'm unsure how to query for the types via the join table. Is this easily achieved? Or would it be better to replace the M-M relationship with a 1-M-1 and have the "join" table as its own resource?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire