Spatie ACL - Blade Templates

Posted in CategoryLaravel
  • C
    Carsten Nelke 2 months ago

    Hi there!

    Is it possible to check in a blade template if the user belongs to a specified role? I know how to check the permission like 

    @can('mypermission')
     ..some code here...
    @endcan

    I want something like:

    @isrole('name-of-role')
      ...Code for this role...
    @endisrole

    I hope someone can help.

  • C
    Carsten Nelke 2 months ago

    Oh damn it... i´ve it on github... Sorry guys, problem is solved 

Please login or register to leave a response.

* You May Also Like Bellow Issue to check *