@extends('layouts.app') @section('content')
Catégories

Selectionner par catégories

Produits
@php $allProducts = collect(['all' => $products])->merge($categories->mapWithKeys(fn($category) => [$category->slug => $category->products])); @endphp @foreach($allProducts as $categorySlug => $filteredProducts)
@forelse($filteredProducts as $product) @empty

Pas de produit(s) disponible

@endforelse
@endforeach
@endsection