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