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('$externaldata::xplore.names')) ->view('externaldata::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('externaldata::xplore.name')) ->view('externaldata::xplore.show') ->data(compact('xplore')) ->output(); } }