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