@extends('layouts.public') @section('content') @php /** * Public "reserve a table" booking form. * @var array $restaurant @var string $cuisineName @var array $labels @var array $closedDows * @var array $blackoutDates @var int $maxParty @var int $leadMinutes * @var array $hours @var bool $isOpen */ $labels = $labels ?? []; $cuisineName = (string) ($cuisineName ?? ''); $maxParty = (int) ($maxParty ?? 50); $leadMinutes = (int) ($leadMinutes ?? 0); $closedJson = implode(',', array_map('intval', $closedDows ?? [])); $blackoutJson = implode(',', array_map('strval', $blackoutDates ?? [])); $slug = (string) $restaurant['slug']; // Sidebar content (info/contact, mini-map) mirrors restaurant-detail.php's own // $renderInfoCard/$renderMiniMap closures exactly - same data, same markup, same // classes - just inlined here since a page-local closure can't be shared across // view files. Real per-restaurant data only, nothing fabricated. $hours = $hours ?? []; $isOpen = (bool) ($isOpen ?? true); $radius = (float) ($restaurant['delivery_radius'] ?? 0); $dayNames = [t('common.day_sunday'), t('common.day_monday'), t('common.day_tuesday'), t('common.day_wednesday'), t('common.day_thursday'), t('common.day_friday'), t('common.day_saturday')]; $todayIdx = (int) date('w'); $mapLive = setting('maps_enabled', '1') === '1' && ($restaurant['lat'] ?? null) !== null && ($restaurant['lng'] ?? null) !== null; // Only a signed-in customer has an account dashboard to track the booking in (the // controller keys the success copy off the same Auth::is('customer') check). Guests // are reached only by phone/email, so we must not promise them an account view. $resvSignedIn = \App\Support\Auth::is('customer'); $rating = (float) ($restaurant['rating_cache'] ?? 0); $ratingCount = (int) ($restaurant['rating_count'] ?? 0); // Cover chain matches restaurant-detail.php exactly: the restaurant's own cover, else the // admin's configured general fallback (Settings -> General), else a clean branded banner — // never a stock photo standing in for a specific restaurant. $hasCover = !empty($restaurant['cover_image']) && is_file(public_path() . '/' . ltrim((string) $restaurant['cover_image'], '/')); $adminFallbackCover = trim((string) setting('fallback_general_image', 'assets/admin/fallback/general-fallback.png')); $hasAdminFallbackCover = $adminFallbackCover !== '' && is_file(public_path() . '/' . ltrim($adminFallbackCover, '/')); $cover = $hasCover ? media($restaurant['cover_image']) : ($hasAdminFallbackCover ? asset($adminFallbackCover) : ''); $hasAnyCover = $hasCover || $hasAdminFallbackCover; @endphp
{{ $restaurant['address'] }}
@endif{{ t_raw('reservation.intro') }}