@php // Switched off in Admin -> Pages: the band does not draw, on any layout that includes it. if (!section_on('cuisine-carousel')) { return; } /** @var array $cuisines Cuisines with restaurant_count (from HomeController). */ $cuisines = collect($cuisines ?? [])->all(); if (empty($cuisines)) { return; } // Baseline taxonomy ships with the schema, so a fresh no-demo install has 22 // cuisines with nothing in them. A strip of nothing-but-"Coming soon" would // advertise content the site does not have — the band waits until at least one // cuisine has a live restaurant. On a living site an occasional empty cuisine // still shows its "Coming soon" card among populated ones; that state is designed. $hasLive = false; foreach ($cuisines as $c) { if ((int) ($c['restaurant_count'] ?? 0) > 0) { $hasLive = true; break; } } if (!$hasLive) { echo partial('sections/band-empty', ['eyebrow' => t('home.cuisine.eyebrow'), 'title' => t('home.browse_cuisine'), 'icon' => 'fa-globe', 'msg' => t('home.empty_cuisines')]); return; } // Up to 4 associated dish icons per cuisine (shown in the card corners). $dishMap = (new \App\Models\Cuisine())->dishTagsByCuisine(4); @endphp