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