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