@extends('frontend.layout') @section('pageHeading') @if (!empty($pageHeading)) {{ $pageHeading->event_page_title ?? __('Events') }} @else {{ __('Events') }} @endif @endsection @php $metaKeywords = !empty($seo->meta_keyword_event) ? $seo->meta_keyword_event : ''; $metaDescription = !empty($seo->meta_description_event) ? $seo->meta_description_event : ''; @endphp @section('meta-keywords', "{{ $metaKeywords }}") @section('meta-description', "$metaDescription") @section('hero-section')
@endsection @section('content')
@if (count($information['events']) > 0) @foreach ($information['events'] as $event)
    @php if ($event->date_type == 'multiple') { $event_date = eventLatestDates($event->id); $date = strtotime(@$event_date->start_date); } else { $date = strtotime($event->start_date); } @endphp
  • {{ \Carbon\Carbon::parse($date)->translatedFormat('d M') }}
  • {{ $event->date_type == 'multiple' ? @$event_date->duration : $event->duration }}
  • @php $start_time = strtotime($event->start_time); @endphp {{ \Carbon\Carbon::parse($start_time)->translatedFormat('h:s A') }}
@if ($event->organizer_id != null) @php $organizer = App\Models\Organizer::where('id', $event->organizer_id)->first(); @endphp @if ($organizer) {{ __('By') }}  {{ $organizer->username }} @endif @else @php $admin = App\Models\Admin::first(); @endphp {{ __('By') }} {{ $admin->username }} @endif
@if (strlen($event->title) > 70) {{ mb_substr($event->title, 0, 70) . '...' }} @else {{ $event->title }} @endif
@php $desc = strip_tags($event->description); @endphp @if (strlen($desc) > 100)

{{ mb_substr($desc, 0, 100) . '....' }}

@else

{{ $desc }}

@endif @php if ($event->event_type == 'online') { $ticket = App\Models\Event\Ticket::where('event_id', $event->id) ->orderBy('price', 'asc') ->first(); } else { $ticket = App\Models\Event\Ticket::where([['event_id', $event->id], ['price', '!=', null]]) ->orderBy('price', 'asc') ->first(); if (empty($ticket)) { $ticket = App\Models\Event\Ticket::where([['event_id', $event->id], ['f_price', '!=', null]]) ->orderBy('price', 'asc') ->first(); } } $event_count = DB::table('tickets') ->where('event_id', $event->id) ->get() ->count(); @endphp
@if ($event->event_type == 'venue') @if ($event->city != null) {{ $event->city }} @endif @if ($event->country) , {{ $event->country }} @endif @else {{ __('Online') }} @endif
@if ($ticket) @if ($ticket->event_type == 'online') @if ($ticket->pricing_type != 'free') @if ($ticket->early_bird_discount == 'enable') @php $discount_date = Carbon\Carbon::parse($ticket->early_bird_discount_date . $ticket->early_bird_discount_time); @endphp @if ($ticket->early_bird_discount_type == 'fixed' && !$discount_date->isPast()) @php $calculate_price = $ticket->price - $ticket->early_bird_discount_amount; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($ticket->price) }} @elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast()) @php $p_price = ($ticket->price * $ticket->early_bird_discount_amount) / 100; $calculate_price = $ticket->price - $p_price; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($ticket->price) }} @else @php $calculate_price = $ticket->price; @endphp {{ symbolPrice($calculate_price) }} @endif @else @php $calculate_price = $ticket->price; @endphp {{ symbolPrice($calculate_price) }} @endif @else {{ __('Free') }} @endif @endif @if ($ticket->event_type == 'venue') @if ($ticket->pricing_type == 'variation') @php $variation = json_decode($ticket->variations, true); $v_min_price = array_reduce( $variation, function ($a, $b) { return $a['price'] < $b['price'] ? $a : $b; }, array_shift($variation), ); $price = $v_min_price['price']; @endphp @if ($currentLanguageInfo->direction == 1) {{ $event_count > 1 ? '*' : '' }} @endif @if ($ticket->early_bird_discount == 'enable') @php $discount_date = Carbon\Carbon::parse($ticket->early_bird_discount_date . $ticket->early_bird_discount_time); @endphp @if ($ticket->early_bird_discount_type == 'fixed' && !$discount_date->isPast()) @php $calculate_price = $price - $ticket->early_bird_discount_amount; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($price) }} @elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast()) @php $p_price = ($price * $ticket->early_bird_discount_amount) / 100; $calculate_price = $p_price - $price; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($price) }} @else @php $calculate_price = $price; @endphp {{ symbolPrice($calculate_price) }} @endif @else @php $calculate_price = $price; @endphp {{ symbolPrice($calculate_price) }} @endif @if ($currentLanguageInfo->direction != 1) {{ $event_count > 1 ? '*' : '' }} @endif @elseif($ticket->pricing_type == 'normal') @if ($currentLanguageInfo->direction == 1) {{ $event_count > 1 ? '*' : '' }} @endif @if ($ticket->early_bird_discount == 'enable') {{-- check discount date over or not --}} @php $discount_date = Carbon\Carbon::parse($ticket->early_bird_discount_date . $ticket->early_bird_discount_time); @endphp @if ($ticket->early_bird_discount_type == 'fixed' && !$discount_date->isPast()) @php $calculate_price = $ticket->price - $ticket->early_bird_discount_amount; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($ticket->price) }} @elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast()) @php $p_price = ($ticket->price * $ticket->early_bird_discount_amount) / 100; $calculate_price = $ticket->price - $p_price; @endphp {{ symbolPrice($calculate_price) }} {{ $ticket->price }} {{ symbolPrice($ticket->price) }} @else @php $calculate_price = $ticket->price; @endphp {{ symbolPrice($calculate_price) }} @endif @else @php $calculate_price = $ticket->price; @endphp {{ symbolPrice($calculate_price) }} @endif @if ($currentLanguageInfo->direction != 1) {{ $event_count > 1 ? '*' : '' }} @endif @else {{ __('Free') }} {{ $event_count > 1 ? '*' : '' }} @endif @endif @endif
@if (Auth::guard('customer')->check()) @php $customer_id = Auth::guard('customer')->user()->id; $event_id = $event->id; $checkWishList = checkWishList($event_id, $customer_id); @endphp @else @php $checkWishList = false; @endphp @endif
@endforeach @else

{{ __('No Event Found') }}

@endif
    {{ $information['events']->links() }}
@if (!empty(showAd(3)))
{!! showAd(3) !!}
@endif
@endsection @section('custom-script') @endsection