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