-
How can I get a list of roles by their users? for example i want:
but i can't get role's users my code
i dont know how add users! |
Beta Was this translation helpful? Give feedback.
Answered by
erikn69
Nov 25, 2021
Replies: 1 comment 3 replies
-
Read sources too always laravel-permission/src/Models/Role.php Lines 72 to 81 in 08cc9bd |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
moecods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read sources too always
$roles = Role::with('permissions','users')->get();
laravel-permission/src/Models/Role.php
Lines 72 to 81 in 08cc9bd