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