@php $header = $snapshot->header(); $logoUrl = $agency->logo ? asset('storage/' . $agency->logo) : null; // Önizlemede public route'lar 404 verir; nav linkleri preview route'una çevrilir $navHref = function (array $p) use ($agency, $preview) { if ($preview) { return match ($p['type']) { 'home' => route('agency.site.preview', 'home'), 'contact' => route('agency.site.preview', 'contact'), 'custom' => route('agency.site.preview', $p['slug']), default => '#', }; } return match ($p['type']) { 'home' => route('customer.agency.show', $agency->slug), 'contact' => route('customer.agency.contact', $agency->slug), 'tours' => route('customer.agency.tours.index', $agency->slug), 'custom' => route('customer.agency.page', ['agency' => $agency->slug, 'pageSlug' => $p['slug']]), default => '#', }; }; $currentType = $page['type'] ?? null; $ctaHref = $preview ? route('agency.site.preview', 'contact') : route('customer.agency.contact', $agency->slug); @endphp
@if($logoUrl) @else {{ $agency->name }} @endif
@if(($header['show_phone'] ?? true) && $agency->contact_phone) {{ $agency->contact_phone }} @endif {{ $header['cta_text'] ?? 'Bize Ulaşın' }}
@foreach($snapshot->navPages() as $navPage) {{ $navPage['nav_label'] }} @endforeach @if($agency->contact_phone) {{ $agency->contact_phone }} @endif