modules = $this->modules(config('ebuy.address.modules'), 'address', guard_url('address')); $this->repository = $address; } /** * Show address's list. * * @return response */ protected function index(PublicRequest $request) { $search = $request->search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $data = $this->repository ->pushFilter(RequestFilter::class) ->pushFilter(AddressPublicFilter::class) ->setPresenter(AddressListPresenter::class) ->select('addresses.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('address::address.names')) ->view('address::public.address.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show address. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $data = $this->repository ->findBySlug($slug) ->toArray(); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('address::address.name')) ->view('address::public.address.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }