public function syncPermissions(...$permissions) { $this->permissions()->detach(); return $this->givePermissionTo($permissions); }