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