@extends('layouts.staff') @section('content')
{{-- HEADER & ACTIONS --}}

Fleet Inventory

Monitor vehicle status and availability.

{{-- SEARCH & FILTERS FORM --}}
{{-- 1. Search Bar --}}
{{-- 2. Model Filter (With Visible Count) --}}
{{-- Calculate Current Count for Display on Button --}} @php $currentModel = request('model', 'all'); $displayCount = ($currentModel == 'all') ? $vehicles->count() : $vehicles->where('model', $currentModel)->count(); @endphp
{{-- 3. Status Filter (With Visible Count) --}}
@php $currentStatus = request('status', 'all'); // Helper logic for display $statusLabel = match($currentStatus) { 'active' => 'Active', 'inactive' => 'Inactive', 'ready' => 'Ready', 'rented' => 'Rented', default => 'All Status' }; @endphp
{{-- Add Button --}} Add Vehicle
@if(session('success'))

Success!

{{ session('success') }}

@endif {{-- VEHICLE LIST --}} @if($vehicles->isEmpty())

No vehicles found matching criteria.

Clear Filters
@endif
@endsection