@section('title', (isset($page_title) ? $page_title . ' | ' : '') . config('app.name')) @section('breadcrumb', isset($page_title) ? $page_title : '')
{{ $page_title }}
@if ($cab_type == 'private')
@endif
@forelse ($list as $key => $data) @php $cab_booking_ids = App\Models\CabBooking::where('cab_id', $data->cab_id) ->where('vehicle_id', $data->vehicle_id) ->where('cab_type', $data->cab_type) ->where('pickup_date', $data->pickup_date) ->pluck('id') ->toArray(); $cab_seat_booking = App\Models\CabSeatBooking::whereIn('cab_booking_id', $cab_booking_ids)->count(); @endphp @empty @endforelse
Assigned Driver Vehicle Info Type Destination Date Status Actions
@if ($data->getDriver->name || $data->getDriver->phone) Name: {{ $data->getDriver->name }}
Phone: {{ $data->getDriver->phone }} @else Assign Driver @endif
Name: {{ $data->getVehicle->name }}
({{ $data->getVehicle->vehicle_number }})
Seat: {{ $data->getVehicle->number_of_seat }}
@if ($cab_seat_booking > 0) Booked Seats: {{ $cab_seat_booking }} @endif
{{ ucFirst($data->cab_type) }} @if($data->journey_type) ({{ ucWords(str_replace('_', ' ', $data->journey_type)) }}) @endif @if ($data->journey_type === 'local') {{ $data->getCab->getDestinationFrom->name }} @else {{ $data->getCab->getDestinationFrom->name }} {{ $data->getCab->getDestinationTo->name }}
Total Distance: {{ $data->getCab->total_distance }} KM @endif
{{ $data->pickup_date }} @if ($data->departure_time)
{{ $data->departure_time }} @endif
@php $badgeClass = match($data->status) { 'pending' => 'bg-warning', 'confirmed' => 'bg-info', 'cancelled' => 'bg-danger', 'completed' => 'bg-success', default => 'bg-secondary' }; @endphp {{ ucWords($data->status) }}