/** * @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']; } }
public function find($id) { return $this->repository->with(['project'])->find($id); }