/** * Find a existent project task * @param $id */ public function findWhere($id, $taskId) { try { return $this->repository->findWhere(['project_id' => $id, 'id' => $taskId]); } catch (ModelNotFoundException $e) { return ['error' => true, 'message' => $e->getMessage()]; } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index($id) { // return $this->repository->findWhere(['project_id' => $id]); }