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