@php $user = auth()->user(); $images = $event->images; $mainImage = $images->first()->image_path ?? null; $prices = $event->prices; $attending = $event->paidOrders()->whereHas('user', function ($q) use ($user) { $q->whereUserId($user?->user_id); })->first(); $attendance = $event->paidOrders; @endphp

{{ $event->name }}

@if($event->tagline)

{{ $event->tagline }}

@endif
@if(count($prices) > 0 && !$attending) đŸŽŸī¸ Buy Tickets @elseif($attending) đŸ“Ĩ Download My Tickets @elseif($event->type->name === 'Online' && $event->event_link) 🔗 Join Online Event @else ✨ Register for Free @endif @if($event->user?->id === $user?->user_id) âœī¸ Edit Event @endif
@if($mainImage)
{{ $event->name }}
@endif
📅
Event Date
{{ (new DateTime($event->start_time))->format('M d, Y') }}
🕐
Start Time
{{ (new DateTime($event->start_time))->format('h:i A') }}
{{ $event->type->name === 'Online' ? 'đŸ’ģ' : '📍' }}
Event Type
{{ $event->type->name }}
đŸ‘Ĩ
Attendees
@if(count($attendance) > 0) {{ $attendance->sum(fn($order) => $order->orderItems->sum('quantity')) }} @else Be the first! @endif

Event Details

📖 About This Event

{!! $event->description !!}

â„šī¸ Event Information

Type: {{ $event->type->name }} Event

Starts: {{ (new DateTime($event->start_time))->format('l, F d, Y at h:i A') }}

Ends: {{ (new DateTime($event->end_time))->format('l, F d, Y at h:i A') }}

Price: {{ count($prices) > 0 ? 'Paid Event' : 'Free Event' }}

@if($event->type->name === 'Online' && $event->event_link) Online Link:
{{ $event->event_link }} @endif

👤 Event Organizer

Name: {{ $event->user?->name() }}

Email: {{ $event->user?->email }}

Get in touch with the organizer for any questions or special requirements about this event.

đŸŽĢ Registration Status

@if(count($attendance) > 0) {{ $attendance->sum(fn($order) => $order->orderItems->sum('quantity')) }} people have already registered for this event.

Don't miss out on this amazing opportunity! @else Be the first to register for this exciting event!

Join us and make unforgettable memories. @endif

@if(count($prices) > 0)

Ticket Options

@foreach($prices as $price)
{{ $price->name }}
${{ number_format($price->price, 2) }}
@if(!$attending) Get Ticket @else
✓ Already Registered
@endif
@endforeach
@endif