public function find($id) { try { return $this->repository->skipPresenter()->find($id); } catch (ModelNotFoundException $e) { return ['error' => true, 'message' => $e->getMessage()]; } }
/** * Show an expecific id * @param $id * @param $noteId * @return array */ public function findWhere($id, $noteId) { try { return $this->repository->skipPresenter()->findWhere(['project_id' => $id, 'id' => $noteId]); } catch (ModelNotFoundException $e) { return ['error' => true, 'message' => $e->getMessage()]; } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // return $this->repository->skipPresenter()->all(); }