Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

Main (default) role #886

Closed Subb98 closed 6 years ago

Subb98 commented 6 years ago

You can have as many Roles as you want for each User and vice versa. How to set the main (default) role for the user? For example, a user has four roles: admin, moderator, developer, user. How to make one role the main, more priority? To display it in the View. For example: $user->setMainRole('some_role')/getMainRole().

adelf commented 6 years ago

Don't use entrust in your project. Just make one field in users table. It will be enough.

Subb98 commented 6 years ago

I solved this case by sets user role in RegisterController, in confirm method.