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