public function update(array $data, $id_project, $id_file) { try { $this->validator->with($data)->passesOrFail(ValidatorInterface::RULE_UPDATE); $file = $this->repository->update($data, $id_file); return $file; } catch (ValidatorException $e) { return ['error' => true, 'message' => $e->getMessageBag()]; } }