@extends('layouts.app') @section('title', 'Fleet Management') @section('breadcrumbs') @endsection @section('content')

Fleet Management

Manage vehicles and fleet status

Add Vehicle
@php $stats = [['label'=>'Total Vehicles','count'=>$stats['total']??0,'icon'=>'bi-truck','color'=>'primary'],['label'=>'Active','count'=>$stats['active']??0,'icon'=>'bi-check-circle','color'=>'success'],['label'=>'In Service','count'=>$stats['in_service']??0,'icon'=>'bi-wrench','color'=>'warning'],['label'=>'Maintenance','count'=>$stats['maintenance']??0,'icon':'bi-tools','color'=>'danger']]; @endphp @foreach($stats as $stat)
@endforeach
Vehicle List
@forelse($vehicles ?? [] as $v) @empty @endforelse
RegistrationTypeCapacityCurrent LocationAssigned DriverLast ServiceStatusActions
{{ $v->registration_number ?? $v->plate ?? 'N/A' }} {{ $v->type ?? 'N/A' }} {{ $v->capacity ?? 'N/A' }} {{ $v->current_location ?? 'N/A' }} {{ $v->driver->name ?? 'Unassigned' }} {{ optional($v->last_service_date)->format('d M Y') ?? 'N/A' }}

No vehicles found

@endsection @push('scripts') @endpush