@php $selectedClassificationIds = $product?->classifications->pluck('id')->all() ?? []; $sizeRow = fn (string $sizeId) => $product?->sizes->firstWhere('size_id', $sizeId); $imageAt = fn (int $i) => $product?->images->values()->get($i); $flags = ['is_new_arrival' => 'New Arrival', 'is_best_seller' => 'Best Seller', 'is_featured' => 'Featured', 'is_limited_edition' => 'Limited Edition', 'is_trending' => 'Trending', 'is_sale' => 'Sale']; @endphp
@csrf @if ($product) @method('PUT') @endif
@if (!$product) @endif

Badges

@foreach ($flags as $flag => $label) @endforeach

Classifications

@foreach ($classificationGroups as $groupKey => $groupLabel)

{{ $groupLabel }}

@foreach (($classificationsByGroup[$groupKey] ?? []) as $item) @endforeach
@endforeach

Sizes & Pricing

Leave a size's SKU blank to remove it from this product.

@foreach ($sizes as $size) @php $row = $sizeRow($size->id); @endphp

{{ $size->display_name }}

@endforeach

Images

@for ($i = 0; $i < $imageSlots; $i++) @php $image = $imageAt($i); @endphp
@endfor
Cancel