@extends('layouts.public') @section('custom-css') @endsection @section('title', 'Browse Cars — ' . config('app.name')) @section('page-bar')

Browse Rental Cars

@endsection @php $productDetails = $products->mapWithKeys(function ($product) { return [ $product->id => [ 'id' => $product->id, 'name' => $product->name, 'category' => optional($product->category)->name, 'description' => $product->description, 'price' => (float) $product->display_price, 'rate_type' => $product->display_rate_type, 'available' => (bool) $product->is_available, 'tags' => $product->tags->pluck('name')->values(), 'photos' => $product->photos->map(fn ($photo) => asset($photo->path))->values(), ], ]; }); @endphp @section('head-extra') @endsection @section('content')
{{-- Search --}}
{{-- Start Date --}}
{{-- Color / Tag Dropdown --}}
@foreach($allTags as $tag) @endforeach @if($allTags->isEmpty())
No colors available.
@endif
@forelse($products as $product) @php $photo = $product->photos->first(); @endphp
{{ $category?->name ?? 'Car Rental' }} @foreach($product->tags as $tag) {{ $tag->name }} @endforeach
@if($photo) {{ $product->name }} @else
No Image
@endif
Starting From
${{ number_format((float) $product->display_price, 2) }} USD
{{ $product->is_available ? 'Available' : 'Unavailable' }}

{{ $product->name }}

{!! $product->description ?: '

Open the listing to view details and book this vehicle.

' !!}
@empty
No vehicles matched the selected date and color filter.
@endforelse
@endsection @section('page-script') @endsection