@php $groupedAllotment = $groupedAllotments->groupBy(function($allotment) { return $allotment->vehicle_no.'-'.$allotment->driver->first_name; }); @endphp @foreach($groupedAllotment as $vehicleNo => $allotments) @foreach($allotments as $allotment) @endforeach
{{ $allotments[0]->driver->first_name }} {{ $allotments[0]->vehicle_no }} {{ $allotments[0]->driver->phone_number }}
Ref Guest Date Time Pax Type Service Pick Up Drop
{{ $allotment->booking->agent_reference }} {{ $allotment->booking->guest_name }} {{ date('m/d/Y', strtotime($allotment->allotment_date)) }} {{ date('H:i', strtotime($allotment->allotment_date)) }} {{ $allotment->booking->adults + $allotment->booking->children }} {{$allotment->booking->type}} {{$allotment->booking->fromPlace->place_name}} To {{$allotment->booking->toPlace->place_name}} @if(!empty($allotment->booking->enroute_places)) - Enroute ( @foreach(json_decode($allotment->booking->enroute_places) as $key => $place) {{ $place->title }}{{ $key < count(json_decode($allotment->booking->enroute_places)) - 1 ? '+ ' : '' }} @endforeach ) @endif {{ $allotment->booking->pickup_location }} {{$allotment->booking->from_flight_number?' - ('.$allotment->booking->from_flight_number.')':''}} {{ $allotment->booking->drop_location }} {{$allotment->booking->to_flight_number?' - ('.$allotment->booking->to_flight_number.')':''}}
@endforeach