@php $supported = ['category', 'brand', 'min_price', 'max_price']; $filters = collect(request()->only($supported))->filter(fn ($value) => $value !== null && $value !== ''); $hasPrice = $filters->has('min_price') || $filters->has('max_price'); $priceLabel = $hasPrice ? ($filters->get('min_price') ?? '…') . ' – ' . ($filters->get('max_price') ?? '…') . ' €' : null; $filters = $filters->except(['min_price', 'max_price']); $labels = [ 'category' => __('shop.category'), 'brand' => __('shop.brand'), ]; @endphp @if($filters->isNotEmpty() || $hasPrice)
@foreach($filters as $key => $value)
{{ $labels[$key] ?? ucfirst($key) }}: {{ $key === 'category' && isset($selectedCategory) ? $selectedCategory->name : $value }} ×
@endforeach @if($hasPrice)
{{ __('shop.price') }}: {{ $priceLabel }} ×
@endif {{ __('shop.clear_all') }}
@endif
@forelse($products as $product)

{{ $product->name }}

    @if($product->discounted_price < $product->price)
  • {{ $product->price }} €
  • @endif
  • {{ $product->discounted_price }} €
@empty

{{ __('shop.category') }} :: {{ Str::headline(collect(request()->segments())->last()) }}

Aucun produit disponible.

@endforelse