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