Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brianbola90's avatar

Users with different Roles on multiple Groups

A User can create a Group and should then be a admin of that group and edit stuff associated to that group. But that same User can also just be a member of another different group and have only read permissions. How would you go about building the relationships for this ? I'm presuming User HasMany Roles Role BelongsTo User User BelongstoMany Groups Group HasMany User But cant figure out how to go further than this and link the USER->GROUP->ROLE. As it looks like I need a three way pivot table but there seems to be a lack of that in Laravel.

0 likes
0 replies

Please or to participate in this conversation.