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