method() === 'PUT' || $this->method() === 'PATCH') { $unq_name = ','.$this->role->id; } return [ 'name' => 'required|string|unique:roles,name'.$unq_name, 'description' => 'required|string', 'permissions' => 'exists:permissions,name', ]; } }