Laravel ACL supports the built-in function of Laravel's Authorization
directives like @can
and @cannot
.
@can('posts.update')
<!-- The Current User Can Update The Post -->
@endcan
@cannot('posts.update')
<!-- The Current User Can't Update The Post -->
@endcannot
In addition to the built-in directives, Laravel ACL provides @canAtLeast
, @role
directives:
@canAtLeast(['posts.update', 'posts.view'])
<!-- The Current User Can Update or View The Post -->
@endCanAtLeast
@role('administrator')
<!-- The Current User is an Administrator -->
@endRole