@foreach($trips as $index => $trip) @if($trip->status == 'SCHEDULED') {{ $index + 1 }} {{ $trip->booking_id }}
{{ date("Y-m-d h:i A", strtotime($trip->assigned_at)) }} @if($trip->status == 'SCHEDULED') {{ date("Y-m-d h:i A", strtotime($trip->schedule_at))}} @else {{ $trip->started_at }} @endif @if($trip->finished_at) {{ date("Y-m-d h:i A", strtotime($trip->finished_at))}} @else {{ $trip->finished_at }} @endif @if($trip->user_name !=null) {{ $trip->user_name }} @endif @if($trip->user_mobile !=null)
{{ $trip->user_mobile }} @endif @if($trip->provider) {{ $trip->provider->name }} @else No driver @endif @if($trip->service_type) {{ $trip->service_type->name }} @endif {{ \Illuminate\Support\Str::limit($trip->s_address, 40) }} {{ \Illuminate\Support\Str::limit($trip->d_address, 40) }} {{ $trip->distance }} {{ $diskm}} @if($trip->payment) {{ $trip->payment->total }} {{ $trip->payment->currency}} @else {{ currency_amt($trip->estimated_fare) }} @endif
@if($trip->fare_type ==1 || $trip->fare_type ==2) (Fixed) @else (Distance) @endif @if($trip->booking_by =='APP') Mobile App ({{ App\Models\User::find($trip->user_id)->device_type }}) @endif @if($trip->booking_by =='WEB') Web Booking @endif @if($trip->booking_by =='STREET') Street Ride @endif @if($trip->booking_by =='DISPATCHER') Dispatcher @endif @if($trip->booking_by =='HOTEL') Hotel @endif @if($trip->booking_by =='CORPORATE') Corporate @endif @if($trip->cancelled_by =='USER') User @endif @if($trip->cancelled_by =='PROVIDER') Driver @endif @if($trip->cancelled_by =='DISPATCHER') Dispatcher @endif @if($trip->cancelled_by =='REJECTED') All Drivers Rejected @endif @if($trip->cancelled_by =='NODRIVER') No Drivers Found @endif @if($trip->cancel_reason !=null) ({{ $trip->cancel_reason }}) @endif @if($trip->status == 'CANCELLED') {{$trip->status}}DISPATCH  
@elseif($trip->status == 'COMPLETED') {{$trip->status}}
@elseif($trip->status == 'SEARCHING') {{$trip->status}}SEARCHING
@elseif($trip->status == 'ACCEPTED') {{$trip->status}}
@elseif($trip->status == 'SCHEDULED') {{$trip->status}}DISPATCH
@else {{$trip->status}}
@endif @elseif(($trip->status != 'SCHEDULED')) {{ $index + 1 }} {{ $trip->booking_id }}
{{ date("Y-m-d h:i A", strtotime($trip->assigned_at)) }} @if($trip->status == 'SCHEDULED') {{ date("Y-m-d h:i A", strtotime($trip->schedule_at))}} @else {{ $trip->started_at }} @endif @if($trip->finished_at) {{ date("Y-m-d h:i A", strtotime($trip->finished_at))}} @else {{ $trip->finished_at }} @endif @if($trip->user_name !=null) {{ $trip->user_name }} @endif @if($trip->user_mobile !=null)
{{ $trip->user_mobile }} @endif @if($trip->provider) {{ $trip->provider->name }} @else No driver @endif @if($trip->service_type) {{ $trip->service_type->name }} @endif {{ \Illuminate\Support\Str::limit($trip->s_address, 40) }} {{ \Illuminate\Support\Str::limit($trip->d_address, 40) }} {{ $trip->distance }} {{ $diskm}} @if($trip->payment) {{ $trip->payment->total }} {{ $trip->payment->currency}} @else {{ currency_amt($trip->estimated_fare) }} @endif
@if($trip->fare_type ==1 || $trip->fare_type ==2) (Fixed) @else (Distance) @endif @if($trip->booking_by =='APP') Mobile App ({{ App\Models\User::find($trip->user_id)->device_type }}) @endif @if($trip->booking_by =='WEB') Web Booking @endif @if($trip->booking_by =='STREET') Street Ride ({{ App\Models\ProviderDevice::where('provider_id',$trip->provider_id)->first()->type }}) @endif @if($trip->booking_by =='DISPATCHER') Dispatcher @endif @if($trip->booking_by =='HOTEL') Hotel @endif @if($trip->booking_by =='CORPORATE') Corporate @endif @if($trip->cancelled_by =='USER') User @endif @if($trip->cancelled_by =='PROVIDER') Driver @endif @if($trip->cancelled_by =='DISPATCHER') Dispatcher @endif @if($trip->cancelled_by =='REJECTED') All Drivers Rejected @endif @if($trip->cancelled_by =='NODRIVER') No Drivers Found @endif @if($trip->cancel_reason !=null) ({{ $trip->cancel_reason }}) @endif @if($trip->status == 'CANCELLED') {{$trip->status}}DISPATCH  
@elseif($trip->status == 'COMPLETED') {{$trip->status}}
@elseif($trip->status == 'SEARCHING') {{$trip->status}}SEARCHING
@elseif($trip->status == 'ACCEPTED') {{$trip->status}}
@elseif($trip->status == 'SCHEDULED') {{$trip->status}}DISPATCH
@else {{$trip->status}}
@endif @endif @endforeach