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