-
@php
$date = strtotime($event->start_date);
@endphp
{{ \Carbon\Carbon::parse($date)->timezone($websiteInfo->timezone)->translatedFormat('d M') }}
@php
if ($event->date_type == 'multiple') {
$event_date = eventLatestDates($event->id);
$date = strtotime(@$event_date->start_date);
} else {
$date = strtotime($event->start_date);
}
@endphp
-
{{ $event->date_type == 'multiple' ? @$event_date->duration : $event->duration }}
-
@php
$start_time = strtotime($event->start_time);
@endphp
{{ \Carbon\Carbon::parse($start_time)->timezone($websiteInfo->timezone)->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->organizer_info->name }}
@endif
@else
@php
$admin = App\Models\Admin::first();
@endphp
{{ $admin->username }}
@endif
@php
$desc = strip_tags($event->description);
@endphp
@if (strlen($desc) > 45)
{{ mb_substr($desc, 0, 50) . '....' }}
@else
{{ $desc }}
@endif
@php
$ticket = DB::table('tickets')->where('event_id', $event->id)->first();
$event_count = DB::table('tickets')
->where('event_id', $event->id)
->get()
->count();
@endphp
@if ($event->event_type == 'venue')
{{ $event->address }}
@else
{{ __('Online') }}
@endif
@if ($ticket)
@if ($ticket->event_type == 'online')
@if ($ticket->price != null)
@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),
);
if ($v_min_price['slot_enable'] == 1) {
$slot_variations = json_decode($ticket->variations, true);
$v_slot_min_price = array_reduce(
$slot_variations,
function ($a, $b) {
return $a['slot_seat_min_price'] <
$b['slot_seat_min_price']
? $a
: $b;
},
array_shift($slot_variations),
);
$price = $v_slot_min_price['slot_seat_min_price'] ?? 0.0;
} else {
$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
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
{{ symbolPrice($price) }}
@endif
@elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast())
@php
$p_price =
($price *
$ticket->early_bird_discount_amount) /
100;
$calculate_price = $price - $p_price;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
{{ symbolPrice($price) }}
@endif
@else
@php
$calculate_price = $price;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
@endif
@endif
@else
@php
$calculate_price = $price;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
@endif
@endif
@if ($currentLanguageInfo->direction != 1)
{{ $event_count > 1 ? '*' : '' }}
@endif
@elseif($ticket->pricing_type == 'normal')
@if ($currentLanguageInfo->direction == 1)
{{ $event_count > 1 ? '*' : '' }}
@endif
@php
if ($ticket->normal_ticket_slot_enable == 1) {
$ticketPrice = $ticket->slot_seat_min_price;
} else {
$ticketPrice = $ticket->price;
}
@endphp
@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 =
$ticketPrice -
$ticket->early_bird_discount_amount;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
{{ symbolPrice($ticketPrice) }}
@endif
@elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast())
@php
$p_price =
($ticketPrice *
$ticket->early_bird_discount_amount) /
100;
$calculate_price = $ticketPrice - $p_price;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
{{ symbolPrice($ticketPrice) }}
@endif
@else
@php
$calculate_price = $ticketPrice;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
@endif
@endif
@else
@php
$calculate_price = $ticketPrice;
@endphp
@if ($calculate_price > 0)
{{ symbolPrice($calculate_price) }}
@endif
@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