Feat: Updating COntrollers to remove business logic moved to boboko/core

This commit is contained in:
2026-09-03 11:47:38 +03:00
parent b87e22381f
commit b2207a622c
6 changed files with 56 additions and 50 deletions
+1 -8
View File
@@ -16,14 +16,7 @@ public function show(string $locale, int $id)
$collection = $product['collections'][0] ?? null;
$variantsData = collect($product['variants'])
->map(fn (array $variant) => [
'id' => $variant['id'],
'price' => $variant['prices'][0]['price'] ?? null,
'image' => $variant['media'][0]['url'] ?? null,
])
->values()
->all();
$variantsData = $this->products->variantSummaries($product);
$firstVariant = $product['variants'][0] ?? null;
$option = $firstVariant['options'][0]['option'] ?? null;