Live Fleet GPS Hub

5s
@php $primaryTourVehicle = collect($fleetData)->firstWhere('status', 'active_sweeping') ?? collect($fleetData)->firstWhere('status', 'standby'); @endphp @if($primaryTourVehicle && $primaryTourVehicle['total_distance_km'] > 0)
{{ $primaryTourVehicle['vehicle_number'] }} ({{ $primaryTourVehicle['driver_name'] }})
{{ $primaryTourVehicle['duration'] }} {{ number_format($primaryTourVehicle['total_distance_km'], 3) }} KM
@endif
@foreach($fleetData as $v) @php $isMatchingFilter = $mapFilter === 'all' || ($mapFilter === 'active' && $v['status'] === 'active_sweeping') || ($mapFilter === 'standby' && $v['status'] === 'standby') || ($mapFilter === 'depot' && $v['status'] === 'depot'); @endphp @if($isMatchingFilter) @endif @endforeach
{{ number_format($initialLat, 4) }}° N, {{ number_format($initialLng, 4) }}° E | {{ $initialLabel }}