how get role of user in laravel spatie 1

how get role of user in laravel spatie

$user->getRoleNames()

Here is what the above code is Doing:
1. We’re getting the user from the database using the id.
2. We’re getting the role names of the user.
3. We’re returning the role names.

Similar Posts