コード例 #1
0
 /**
  * @param $id int
  * @param $idTask int
  * @return Response
  */
 public function destroy($id, $idTask)
 {
     try {
         $this->repository->delete($idTask);
         return ['status' => true, 'message' => 'Tarefa do projeto excluída com sucesso'];
     } catch (ModelNotFoundException $e) {
         return ['status' => false, 'message' => 'Não foi possível excluir a tarefa do projeto'];
     }
 }
コード例 #2
0
 public function find($id)
 {
     return $this->repository->with(['project'])->find($id);
 }