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