modules = $this->modules(config('realestate.property.modules'), 'property', guard_url('property')); $this->repository = $property; } /** * Show property'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(PropertyPublicFilter::class) ->setPresenter(PropertyListPresenter::class) ->select('properties.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('property::property.names')) ->view('property::public.property.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show property. * * @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('property::property.name')) ->view('property::public.property.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }