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