Home  >  Q&A  >  body text

php - laravel5.2 entrust error when using ability

Just paste the code below:

1. blade.php代码如下:
    @if($role->name !== 'admin')
        @ability('admin', 'delete_role')
              @include('auth.roles._deleteForm')
        @endability
    @endif

    @ability('admin', 'edit_role')
        @include('auth.roles._editRoleModal')
    @endability
  2. 错误显示:
    

3. entrust版本为"zizaco/entrust": "5.2.x-dev"

This is a magical problem. I don’t know which master has encountered or solved it. Let’s discuss it

phpcn_u1582phpcn_u15822733 days ago457

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-19 10:10:03

    This is really a deep hole. It is due to a bug in the entrust version, so upgrading to the latest version of entrust will solve it perfectly!!!

    reply
    0
  • Cancelreply