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