{{ $transporterName ?: '-' }}
Total Vehicles: {{ str_pad((string) $vehicleCount, 2, '0', STR_PAD_LEFT) }}
| Vehicle No |
Transporter Name |
Type |
Capacity |
No of Vehicle |
Reg Number |
Primary Driver |
Additional Drivers |
Status |
@forelse ($vehicles as $row)
@php
$additionalDriverNames = collect($row->secondary_driver_id ?? [])
->filter(fn($id) => !is_null($id) && $id !== '')
->map(fn($id) => $secondaryDriverNameMap[(int) $id] ?? null)
->filter()
->values()
->implode(', ');
@endphp
| {{ $row->vehicle_number ?: '-' }} |
{{ $transporterName ?: '-' }} |
{{ optional($row->vehicleType)->name ?: '-' }} |
{{ $row->capacity_kg !== null ? rtrim(rtrim((string) $row->capacity_kg, '0'), '.') . ' Kg' : '-' }} |
{{ str_pad((string) $vehicleCount, 2, '0', STR_PAD_LEFT) }} |
{{ $row->registration_number ?: '-' }} |
{{ optional($row->primaryDriver)->name ?: '-' }} |
{{ $additionalDriverNames ?: '-' }} |
@if ((int) $row->status === 1)
Active
@elseif ((int) $row->status === 2)
Under Maintenance
@else
Inactive
@endif
|
@empty
| No records found. |
@endforelse