How to get Users by role in laravel?
You can determine if a user has a certain role: $user->hasRole('writer'); // or at least one role from an array of roles: $user->hasRole(['editor', 'moderator']); You can also determine if a user has any of a given list of roles: $user->hasAnyRole(['writer', 'reader']); // or $user->hasAnyRole('writer', 'reader');
How do you assign a role?
Assign roles in user profile
You can also assign roles to users from their individual profile page. Go to Dashboard > User Management > Users and click the name of the user. Click the Roles view, and click Assign Role. Choose the role you wish to assign and click Assign.