@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->tagline }}
@endif
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
Name: {{ $event->user?->name() }}
Email: {{ $event->user?->email }}
Get in touch with the organizer for any questions or special requirements about this event.
@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