Event Details

{{ $event->event_name }}

Date & Time: {{ $event->evt_time }}

Event Place: {{ $event->evt_place }}

Groom Name: {{ $event->groom_name }}

Bride Name: {{ $event->bride_name }}

@php $totalAttended = 0; $attendingPersons = 0; $pendingPersons = 0; $declinedPersons = 0; foreach ($invites as $inv) { if ($inv->status == 1) { $attendingCount = 1; $needValue = $inv->need; if (is_array($needValue)) { foreach ($needValue as $item) { if (is_string($item) && preg_match('/Guests:\s*(\d+)\s*people/i', $item, $matches)) { $attendingCount = (int) $matches[1]; break; } } } elseif (is_string($needValue)) { if (preg_match('/Guests:\s*(\d+)\s*people/i', $needValue, $matches)) { $attendingCount = (int) $matches[1]; } } $totalAttended += $attendingCount; $attendingPersons += $attendingCount; } elseif ($inv->status == 0) { $pendingPersons += $inv->person_count; } elseif ($inv->status == 2) { $declinedPersons += $inv->person_count; } } $totalInvited = $invites->sum('person_count'); $attendingRSVPs = $invites->where('status', 1)->count(); $pendingRSVPs = $invites->where('status', 0)->count(); $declinedRSVPs = $invites->where('status', 2)->count(); @endphp
{{ $invites->count() }}
Total RSVPs
{{ $attendingPersons }}
Attending Guests
{{ $pendingRSVPs }}
Pending Guests
{{ $declinedRSVPs }}
Declined Guests
Attending:
{{ $attendingRSVPs }} RSVPs ({{ $attendingPersons }} guests)
Pending:
{{ $pendingRSVPs }} RSVPs ({{ $pendingPersons }} guests)
Declined:
{{ $declinedRSVPs }} RSVPs ({{ $declinedPersons }} guests)
Total Invited:
{{ $totalInvited }}

Guest List

@foreach ($invites as $key => $inv) @endforeach
# Guest Name Mobile Invited Guests Attending Guests Status
{{ $key + 1 }} {{ $inv->guest->name ?? 'N/A' }} {{ $inv->guest->mobile ?? 'N/A' }} {{ $inv->person_count }} @php $attendingCount = '-'; if ($inv->status == 1) { $needValue = $inv->need; $attendingCount = 1; if (is_array($needValue)) { foreach ($needValue as $item) { if ( is_string($item) && preg_match('/Guests:\s*(\d+)\s*people/i', $item, $matches) ) { $attendingCount = (int) $matches[1]; break; } } } elseif (is_string($needValue)) { if (preg_match('/Guests:\s*(\d+)\s*people/i', $needValue, $matches)) { $attendingCount = (int) $matches[1]; } } } @endphp {{ $attendingCount }} @if ($inv->status == 1) Attending @elseif($inv->status == 0) Pending @elseif ($inv->status == 2) Declined @endif
{{-- Additional summary if needed --}}