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