search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Classified::pushScope(new RequestScope()) ->pushScope(new ClassifiedPublicScope()) ->paginate($pageLimit) ->withQueryString(); $classifieds = new ClassifiedsCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('classified::classified.names')) ->view('classified::public.classified.index') ->data(compact('classifieds', 'categories', 'tags', 'recent')) ->output(); } /** * Show classified. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Classified::findBySlug($slug); $data = new ClassifiedResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('classified::classified.name')) ->view('classified::public.classified.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }