@php /** Right slide-in cuisines A-Z directory (with alphabet rail). */ $cuisineModel = new \App\Models\Cuisine(); $cuisines = $cuisineModel->withCounts(); // Same rule as every storefront surface: only cuisines with a live restaurant. $cuisines = collect($cuisines ?? []) ->filter(static fn ($row): bool => (int) ($row['restaurant_count'] ?? 0) > 0) ->values()->all(); usort($cuisines, static fn ($a, $b) => strcasecmp((string) $a['name'], (string) $b['name'])); $present = []; foreach ($cuisines as $c) { $present[strtoupper(substr((string) $c['name'], 0, 1))] = true; } // Representative dish icons per cuisine (reuse the 23 3D icons; FA glyph fallback). $dishMap = $cuisineModel->dishTagsByCuisine(4); $has3d = []; foreach (glob(public_path() . '/assets/client/icons3d/*.png') ?: [] as $p) { $has3d[basename($p, '.png')] = true; } @endphp @php // The background photo is a branding field (cuisines_panel_bg); app.css reads the variable and // keeps the shipped photo as its own fallback, so a stylesheet served without this attribute // still looks right. @endphp