Skip to content

Show all roles under a user who has multiple roles #1733

Answered by drbyte
lachie-92 asked this question in Q&A
Discussion options

You must be logged in to vote

https://spatie.be/docs/laravel-permission/v4/basic-usage/basic-usage

// get the names of the user's roles
$roles = $user->getRoleNames(); // Returns a collection

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@smongare
Comment options

Answer selected by drbyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants