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