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