@php /** @var \App\Domain\Catalog\Models\Product $product */ $imageCount = $product->images->count(); @endphp

{{ __('Images') }}

@if ($imageCount > 0)
@foreach ($product->images as $image)
{{ $product->name }} @if ($image->is_primary) {{ __('Primary') }} @endif
@unless ($image->is_primary)
@csrf @method('PATCH')
@else @endunless
@csrf @method('DELETE')
@endforeach
@else

{{ __('No images uploaded yet.') }}

@endif @if ($imageCount < \App\Domain\Catalog\Services\ProductImageService::MAX_IMAGES_PER_PRODUCT)
@csrf

{{ __('PNG or JPG, up to 4MB each. Up to :max images per product (:count uploaded).', ['max' => \App\Domain\Catalog\Services\ProductImageService::MAX_IMAGES_PER_PRODUCT, 'count' => $imageCount]) }}

{{ __('Upload') }}
@else

{{ __('This product has reached the maximum of :max images.', ['max' => \App\Domain\Catalog\Services\ProductImageService::MAX_IMAGES_PER_PRODUCT]) }}

@endif