Your visit has been approved. Please present the QR at the gate.
@php // Purpose: strictly from visit/controller (no table lookup) $purpose = $purpose_label ?? ($visit->purpose_text ?? null) ?? ($visit->purpose ?? null) // plain text column if you have it ?? ($visit->purpose_name ?? null) // plain text column if you have it ?? '—'; // Location: prefer plain text if available; then relation as fallback $location = $visit->location_text ?? optional($visit->location)->name ?? $visit->location_id ?? '—'; $hostLine = $visit->host_name ? ($visit->host_email ? $visit->host_name.' ('.$visit->host_email.')' : $visit->host_name) : null; $tz = config('app.timezone', 'UTC'); $start = $visit->scheduled_at ? \Carbon\Carbon::parse($visit->scheduled_at)->timezone($tz)->format('d M Y, H:i') : '—'; $end = $visit->scheduled_to ? \Carbon\Carbon::parse($visit->scheduled_to)->timezone($tz)->format('d M Y, H:i') : '—'; @endphp

Your Visit is Finalized

Hello {{ $visitor->full_name }},

Your visit has been approved. Please present the QR code at the gate.

@if($hostLine) @endif
Purpose {{ $purpose }}
Location {{ $location }}
Start {{ $start }} ({{ $tz }})
End {{ $end }} ({{ $tz }})
Host {{ $hostLine }}
@if(!empty($qrUrl))
QR Code

Keep this QR handy. You may show it on your phone or print it.

@endif

We look forward to seeing you.

© {{ date('Y') }} SmartPass. All rights reserved.