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('offplan::booking.names')) ->view('offplan::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('offplan::booking.name')) ->view('offplan::public.booking.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }