Exemplo n.º 1
0
 public function update(array $data, $id)
 {
     try {
         $this->validator->with($data)->passesOrFail();
         return $this->repository->upadate($data, $id);
     } catch (ValidatorException $e) {
         return ['error' => true, 'message' => $e->GetMessageBag()];
     }
 }