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