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