/** * slider迁徙 * @param DeepInUpload $upload */ protected function slider(DeepInUpload $upload) { $sliders = ShopSlider::all(); foreach ($sliders as $item) { if (!$item instanceof ShopSlider) { continue; } $banner = $item->sliderPic(); if (empty($banner)) { continue; } $response = $upload->getUpYunUrl($banner); $responseValue = $response->getResponseValue(); if ($responseValue instanceof UpYunResponseValue) { $this->addToMap($banner, $responseValue->getLocation()); } } }