We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm creating a table with all the users and i need to know what role each users has. Is there a way to achieve this?
The text was updated successfully, but these errors were encountered:
I've achieved this by using: $user->roles->first()['name'] Is there any faster way?
$user->roles->first()['name']
Sorry, something went wrong.
You can check out some of the methods I am working on the development branch. They might be what you are looking for:
https://github.com/jeremykenedy/laravel-roles/blob/development/src/Traits/RolesGUITraits.php#L109
https://github.com/jeremykenedy/laravel-roles/blob/development/src/App/Http/Controllers/LaravelRolesController.php#L47
https://github.com/jeremykenedy/laravel-roles/blob/development/src/resources/views/laravelroles/crud/dashboard.blade.php#L56
https://github.com/jeremykenedy/laravel-roles/blob/development/src/resources/views/laravelroles/cards/roles-card.blade.php#L49
Thanks for your help and fast reply!
No branches or pull requests
I'm creating a table with all the users and i need to know what role each users has. Is there a way to achieve this?
The text was updated successfully, but these errors were encountered: