/** * @param string $sku * @param ImageOrderRequest $request * * @return JsonResponse */ public function putImageOrder(string $sku, ImageOrderRequest $request) { $this->catalogueRepository->updateImageOrder($this->catalogueRepository->loadProductBySku($sku), $request->imageOrder()); return $this->webUi->json($request->imageOrder(), 200); }
/** * @param int $optionId * @param ImageOrderRequest $request * * @return \Illuminate\Http\Response|JsonResponse */ public function putImageOrder(int $optionId, ImageOrderRequest $request) { $this->catalogueRepository->updateImageOrder($this->catalogueRepository->loadOptionById($optionId), $request->imageOrder()); return $this->webUi->json($request->imageOrder(), 200); }