@extends('layouts.app') @section('title', 'Transport Routes') @section('content') @php $money = fn ($v) => \App\Support\Fmt::money2($v); @endphp

Routes, stops and vehicle assignments

Transport Routes

CSV
@include('partials.flashes')
@foreach ([ ['label' => 'Total Routes', 'value' => $stats['Total Routes']], ['label' => 'Total Stops', 'value' => $stats['Total Stops']], ['label' => 'Total Vehicles', 'value' => $stats['Total Vehicles']], ['label' => 'Students on Transport', 'value' => $stats['Students on Transport']], ] as $stat)
{{ $stat['value'] }} {{ $stat['label'] }}
@endforeach
Clear
@forelse ($rows as $route) @php $vehicle = $route->vehicle; @endphp @empty @endforelse
Route Description Stops Students Vehicle Driver Status Actions
{{ $route->name }} {{ $route->id }}
{{ $route->description ?: '—' }} {{ $route->stops->count() }} {{ $route->assignments_count }} {{ $vehicle?->registration_no ?: '—' }} {{ $vehicle?->driverName() ?? '—' }} {{ $vehicle ? 'Assigned' : 'No vehicle' }}
@csrf @method('DELETE')
No routes match your filters.
{{ $rows->count() }} of {{ $totalRoutes }} routes
@if ($rows->onFirstPage()) Previous @else Previous @endif Page {{ $rows->currentPage() }} of {{ max(1, $rows->lastPage()) }} @if ($rows->hasMorePages()) Next @else Next @endif
any()) open @endif> Add Route

Fields marked * are required. Prices are in KES.

@include('transport.partials.route-form', [ 'action' => route('transport.routes.store'), 'method' => 'POST', 'prefix' => 'route-new', 'row' => null, ])
@endsection