Skip to content

Complex User, Group and Role Relationship #233

Closed Answered by staudenmeir
nilskretschmer asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nilskretschmer,
It's not possible to nest merged relationships like this, but you should be able to achieve your goal with a different approach.

Replace (new User)->rolePermissions() and (new User)->groupPermissions() with their "original" relationships. So replace (new User)->rolePermissions() with two deep relationships:

  • User -> Role -> Permission
  • User -> Role -> Group -> Permission

In the end, the Schema::createOrReplaceMergeView() call should have five relationships. Do you know what I mean?

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@nilskretschmer
Comment options

@staudenmeir
Comment options

@nilskretschmer
Comment options

Answer selected by nilskretschmer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants