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