1

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

$role->deattachPermission($permission);

its not work.

Farshid Rezaei
  • 751
  • 2
  • 10
  • 34

2 Answers2

2

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

thefallen
  • 9,496
  • 2
  • 34
  • 49
0

Couple of options:

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

Or

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

Taylor Foster
  • 1,103
  • 1
  • 11
  • 24