-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feature: add blade directives to check if user has certain role #12
Comments
I think it's a good idea to have that functionality, but I don't like the naming. This would be better: @role('administrator')
<some html/php here>
@endrole
Of course the directives should handle both strings and arrays. If you would make a PR for this, I'd likely accept it. |
I'm using As for the naming, it may be even better to make them consistent with the other PR I'm working on, to have |
In that case our blade directives should have an Good idea on the naming. Blade directives are generally lowercase so I prefer if the ones you add are lowercase as well. On top of the ones you're proposing a Thoughts? |
Agree, also with the fact that So to sum up, we would have:
|
👍 go forth and code! |
It would be useful to have a blade directive that checks if a user has all or any of a given list (array) of roles. The syntax could be like this:
What are your thoughts on this?
The text was updated successfully, but these errors were encountered: