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