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