laravelentrust

How to Deattach permissions from a role? (in laravel Freamwork and entrust package.)


i working whith entrust package in laravel for management roles and permissions.

$role->deattachPermission($permission);

its not work.


Solution

  • Couple of options:

    $role->perms()->sync([]);

    Or

    $role->perms()->detach($permission)