{{-- Reusable Event Card Component Usage: @include('web.partials.event-card', ['event' => $event]) --}} @php $locale = app()->getLocale(); $eventTitle = $event->getTranslation('title', $locale); $locationName = $event->getTranslation('location_name', $locale); @endphp {{-- Image --}} @if($event->image) @else @endif {{-- Date Badge --}} @if($event->start_date) {{ $event->start_date->translatedFormat('M') }} {{ $event->start_date->format('d') }} @endif {{-- Free / Price Badge --}} @if($event->is_free) {{ $locale === 'ar' ? 'مجاني' : 'Free' }} @elseif($event->price) {{ number_format($event->price) }} {{ $locale === 'ar' ? 'ر.س' : 'SAR' }} @endif {{-- Content --}} {{-- Category --}} @if($event->category) {{ $event->category->getTranslation('name', $locale) }} @endif {{-- Title --}} {{ $eventTitle }} {{-- Date & Time --}} @if($event->start_date) {{ $event->start_date->translatedFormat('D, d M Y') }} @if($event->start_date->format('H:i') !== '00:00') {{ $event->start_date->format('g:i A') }} @endif @endif {{-- Location --}} @if($locationName) {{ $locationName }} @endif
{{ $locationName }}