-
Notifications
You must be signed in to change notification settings - Fork 24
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
@role('admin') #4
Comments
To do this we have to use |
But this construction does not work @ROLE(('moderator|admin')) |
It's fixed. Thank you. |
sure |
@ROLE('admin') Now it works. |
There are total three blade directives. @role('admin')
<p>This is visible to users with the admin role. Gets translated to
\Ntrust::role('admin')</p>
@endrole
@permission('manage-admins')
<p>This is visible to users with the given permissions. Gets translated to
\Ntrust::can('manage-admins'). The @can directive is already taken by core
laravel authorization package, hence the @permission directive instead.</p>
@endpermission
@ability('admin,owner', 'create-post,edit-user')
<p>This is visible to users with the given abilities. Gets translated to
\Ntrust::ability('admin,owner', 'create-post,edit-user')</p>
@endability Also let me know if you think any feature missing. |
I mean, available use of multiple roles for the @ROLE directive in Blade (explode() function) |
You can use like below role with or condition.
|
Thanks, sorry for my carelessness. |
You can use like below. @role(['superadmin', 'user'])
This should have role 'superadmin' or 'user'.
@endrole @role(['superadmin', 'user'], true)
This should have both role 'superadmin' and 'user'.
@endrole |
get ErrorException
Parse error: syntax error, unexpected ''admin'' (T_CONSTANT_ENCAPSED_STRING) (View: ...
The text was updated successfully, but these errors were encountered: