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