diff --git a/src/Entrust/Traits/EntrustRoleTrait.php b/src/Entrust/Traits/EntrustRoleTrait.php index 4e39439a..90be0cc0 100644 --- a/src/Entrust/Traits/EntrustRoleTrait.php +++ b/src/Entrust/Traits/EntrustRoleTrait.php @@ -174,7 +174,7 @@ public function attachPermission($permission) return $this->attachPermissions($permission); } - $this->perms()->attach($permission); + $this->perms()->sync($permission, false); } /** diff --git a/src/Entrust/Traits/EntrustUserTrait.php b/src/Entrust/Traits/EntrustUserTrait.php index c799bbeb..8eb540f7 100644 --- a/src/Entrust/Traits/EntrustUserTrait.php +++ b/src/Entrust/Traits/EntrustUserTrait.php @@ -257,7 +257,7 @@ public function attachRole($role) $role = $role['id']; } - $this->roles()->attach($role); + $this->roles()->sync($role, false); } /**