Open ajoudh opened 6 years ago
Basically I just want to count users based on there roles, something like this:
roles count admin 4 user 2 $role_name $User_withthisRole_count
not sure what to do..
Here is something i personally use: User::whereHas('roles', function($query) { $query->where('id', 1); })->count() to count users based on roles.
User::whereHas('roles', function($query) { $query->where('id', 1); })->count()
Basically I just want to count users based on there roles, something like this:
not sure what to do..