@php $bride = $invitation->bride ?? [ 'name' => 'Citra Maharani', 'nickname' => 'Citra', ]; $groom = $invitation->groom ?? [ 'name' => 'Adit Pratama', 'nickname' => 'Adit', ]; $events = $invitation->events ?? [ [ 'title' => 'Akad Nikah', 'date' => '2026-12-20', 'start_time' => '08:00', 'end_time' => '10:00', 'timezone' => 'WIB', ], [ 'title' => 'Resepsi Pernikahan', 'date' => '2026-12-20', 'start_time' => '11:00', 'end_time' => '14:00', 'timezone' => 'WIB', ], ]; $primaryEvent = $events[0] ?? null; $eventDate = $primaryEvent['date'] ?? '2026-12-20'; $carbonDate = \Carbon\Carbon::parse($eventDate); $formattedDate = $carbonDate->locale('id')->isoFormat('dddd, D MMMM Y'); $isDemoMode = request()->routeIs('template.demo*') || request()->is('demo/*') || !empty($invitation->is_demo); $backUrl = $isDemoMode ? route('template.demo', $template->slug ?? 'exclusive03') : (!empty($invitation->slug) ? route('invitation.public', $invitation->slug) : '#'); if ($guestName ?? null) { $backUrl .= (str_contains($backUrl, '?') ? '&' : '?') . 'to=' . urlencode($guestName); } $streamUrl = $invitation->streaming_url ?? 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; $embedUrl = ''; $videoId = ''; if (str_contains($streamUrl, 'watch?v=')) { preg_match('/v=([^&]+)/', $streamUrl, $matches); $videoId = $matches[1] ?? ''; } elseif (str_contains($streamUrl, 'youtu.be/')) { preg_match('/youtu\.be\/([^?]+)/', $streamUrl, $matches); $videoId = $matches[1] ?? ''; } elseif (str_contains($streamUrl, 'youtube.com/embed/')) { preg_match('/embed\/([^?]+)/', $streamUrl, $matches); $videoId = $matches[1] ?? ''; } if ($videoId) { $embedUrl = "https://www.youtube.com/embed/{$videoId}?autoplay=1&rel=0&modestbranding=1"; } @endphp
JANOER KOENING PRESENTS
Wedding Live Streaming
@if($guestName ?? null)Selamat datang, {{ $guestName }}
@endifTautan siaran langsung akan segera diperbarui