how to filter relation by role? #2028
Unanswered
andreskrip
asked this question in
Q&A
Replies: 1 comment
-
Maybe with join to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, is it possible that only the user who has the role can get relation data, and the rest of the users get an empty relation?
I tried the #992 (comment) solution:
but it doesn't work (BadMethodCallException. Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::role())
Beta Was this translation helpful? Give feedback.
All reactions