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