repository = $vessel_logbook; parent::__construct(); } /** * Show vessel_logbook's list. * * @param string $slug * * @return response */ protected function index() { $vessel_logbooks = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->setMetaTitle(trans('logbook::vessel_logbook.names')) ->view('logbook::public.vessel_logbook.index') ->data(compact('vessel_logbooks')) ->output(); } /** * Show vessel_logbook. * * @param string $slug * * @return response */ protected function show($slug) { $vessel_logbook = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($vessel_logbook->name . trans('logbook::vessel_logbook.name')) ->view('logbook::public.vessel_logbook.show') ->data(compact('vessel_logbook')) ->output(); } }