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