Did you find an answer ?
Relationship between two tables via two separate pivots
I'm having a tough time wrapping my head around this problem. Assume there are two tables:
-Group (which has a pivot table group_members, which takes into account different types of users, etc)
-Notifications
Now, the relationship I wanted to model was between Notifications and group_members, as every group member can be the recipient of a notification, and a single notification can be sent out to multiple recipients. This seems to require another pivot table: notification_group_members.
So, really, what it seems to be is that I have a relationship between two pivot tables. It would be easy to come up with a solution simply using DB::(), but I would prefer to use the existing models I have, and not have to create new models for the pivot tables. Is there a way to do this? Any ideas?
Please or to participate in this conversation.