public function syncPermissions(array $permissionIds = []) { $this->flushPermissionCache(); return $this->permissions()->sync($permissionIds); }