
WARNING You're browsing the documentation for an old version of LARAVEL-ACL. Consider upgrading your project to laravel-acl 12.0.
Blade Directives
Laravel ACL supports the built-in function of Laravel's Authorization directives like @can and @cannot.
@can($permission)
@can('posts.update')    <!-- The Current User Can Update The Post -->@endcan@cannot($permission)
@cannot('posts.update')    <!-- The Current User Can't Update The Post -->@endcannotAdditional Directives
In addition to the built-in directives, Laravel ACL provides @canAtLeast,  @role directives:
@canAtLeast([$permissions])
@canAtLeast(['posts.update', 'posts.view'])    <!-- The Current User Can Update or View The Post -->@endCanAtLeast@role($roleSlug)
@role('administrator')    <!-- The Current User is an Administrator -->@endRole