-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
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
enabling hasRole to receive array or string #20
Conversation
You can check if user has a role. using hasAnyRole method ([ 'admin', 'manager'])
using method hasRole('admin') or hasRole([ 'admin', 'manager']); |
Not exactly what I was saying, but I also like the idea of multi-purposing a single method like you implemented. Thanks. Merging. |
Made some tweaks to functionality. Figured we're already using the any verb with Also, this has been tagged, so you should be able to start using this in your project. Thanks again. |
Very good. Thx |
You can check if user has a role.
using hasAnyRole([ 'admin', 'manager'])