Replies: 1 comment 2 replies
-
maybe you are overwriting |
Beta Was this translation helpful? Give feedback.
2 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.
-
When I want to filter users based on the role name, an error like this appears. Here is the query I use to filter data by role.
$this->model
->when($role != '' || $role != null, function ($query) use ($role) { $query->whereHas('role', function ($roles) use ($role) { $roles->where('name','LIKE','%'.$role.'%'); })
Beta Was this translation helpful? Give feedback.
All reactions