Пример #1
0
 public function find($id)
 {
     try {
         return $this->repository->skipPresenter()->find($id);
     } catch (ModelNotFoundException $e) {
         return ['error' => true, 'message' => $e->getMessage()];
     }
 }
Пример #2
0
 /**
  * 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()];
     }
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     return $this->repository->skipPresenter()->all();
 }