@foreach($products as $p)
@php
$prodMeta = $p->productable;
$duration = $prodMeta->duration_hours ?? ($prodMeta->duration_days ?? null);
$city = $prodMeta->departureCity?->name;
$locations = is_array($prodMeta->visit_locations) ? implode(' - ', array_slice($prodMeta->visit_locations, 0, 3)) : null;
@endphp
@if($p->code)
{{ $p->code }}
@endif
{{ $p->name }}
@if($city)
{{ $city }}
@endif
@if($duration)
{{ $duration }} {{ isset($prodMeta->duration_hours) ? 'Saat' : 'Gün' }}
@endif
@if($prodMeta->meal_included ?? false)
Yemek Dahil
@endif
@if($locations)
{{ $locations }}
@endif
{{ number_format($p->base_price, 2) }} {{ $p->currency }}
@endforeach