@extends('layouts.app') @section('title', 'Listing Details') @section('content')

Listing Details

{{ $listing->title }}

{{-- 1. Basic Information --}}
1. Basic Information

{{ $listing->specification?->make ?? 'N/A' }}

{{ $listing->specification?->model ?? 'N/A' }}

{{ $listing->specification?->year ?? 'N/A' }}

{{ $listing->specification?->trim ?? 'N/A' }}

{{ $listing->specification?->vin ?? 'N/A' }}

{{-- 2. Technical Specifications --}}
2. Technical Specifications

{{ $listing->specification?->engine_capacity ?? 'N/A' }} cc

{{ ucfirst($listing->specification?->fuel_type ?? 'N/A') }}

{{ ucfirst($listing->specification?->transmission ?? 'N/A') }}

{{ $listing->specification?->drive_type ?? 'N/A' }}

{{ number_format($listing->specification?->mileage ?? 0) }} miles

{{-- 3. Body and Exterior --}}
3. Body and Exterior

{{ ucfirst($listing->specification?->body_type ?? 'N/A') }}

{{ $listing->specification?->exterior_color ?? 'N/A' }}

{{ $listing->specification?->interior_color ?? 'N/A' }}

{{ $listing->specification?->seats ?? 'N/A' }}

{{ $listing->specification?->doors ?? 'N/A' }}

{{-- 4. Price and Financing --}}
4. Price and Financing

${{ number_format($listing->price, 2) }}

@if ($listing->financing_options && count($listing->financing_options) > 0) {{ implode(', ', array_map('ucfirst', $listing->financing_options)) }} @else N/A @endif

{{-- 5. Features and Options --}}
5. Features and Options
@if ($listing->features && $listing->features->count() > 0) @php $safetyFeatures = $listing->features->where('category', 'safety'); $comfortFeatures = $listing->features->where('category', 'comfort'); $entertainmentFeatures = $listing->features->where('category', 'entertainment'); @endphp @if ($safetyFeatures->count() > 0)
Safety Features:
@foreach ($safetyFeatures as $feature) {{ $feature->name }} @endforeach
@endif @if ($comfortFeatures->count() > 0)
Comfort Features:
@foreach ($comfortFeatures as $feature) {{ $feature->name }} @endforeach
@endif @if ($entertainmentFeatures->count() > 0)
Entertainment Features:
@foreach ($entertainmentFeatures as $feature) {{ $feature->name }} @endforeach
@endif @else

No features listed

@endif
{{-- 6. Additional Information --}}
6. Additional Information

{{ $listing->title }}

{{ $listing->location }}

@if ($listing->description)

{{ $listing->description }}

@endif

{!! $listing->status->badge() !!}

{{ $listing->created_at->format('d M Y, h:i A') }}

{{-- 7. Dealer Information --}}
7. Dealer Information

{{ $listing->owner->fullName }}

{{ $listing->owner->phone ?? 'N/A' }}

{{ $listing->owner->email }}

{{-- 8. Images --}} @if ($listing->image_url && count($listing->image_url) > 0)
8. Vehicle Images
@foreach ($listing->image_url as $image)
Listing Image
@endforeach
@endif
@endsection