Getting all users that have a specific permission from a role #2003
Answered
by
CovertError
CovertError
asked this question in
Q&A
-
is there a simple way to get all the users that have specific permission whether it's from a role or just directly? |
Beta Was this translation helpful? Give feedback.
Answered by
CovertError
Jan 29, 2022
Replies: 1 comment
-
never mind I found it in the docs |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
CovertError
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
never mind I found it in the docs
$users = User::permission('edit articles')->get(); // Returns only users with the permission 'edit articles' (inherited or directly)