How would I do the opposite of ->where('array_field', 'all', ['item']) #2114
Answered
by
fidan-mkdir
fidan-mkdir
asked this question in
Q&A
-
I have the need to find all users that do not have a certain permission. What I would do when I want to find all users with some permissions is:
But if I want to find specific users that do not have the 'admin admin' permission, I have no idea how to do it. |
Beta Was this translation helpful? Give feedback.
Answered by
fidan-mkdir
Oct 8, 2020
Replies: 1 comment 1 reply
-
Wow, was it as simple as |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fidan-mkdir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow, was it as simple as
$users = User::where('permissions','!=, 'admin admin')->get();
or am I missing something, I've wasted more than an hour to try this..