@extends('layouts.app') @section('content')
| {{ app()->getLocale() == 'ar' ? 'السيارة' : 'Car' }} | {{ app()->getLocale() == 'ar' ? 'النوع' : 'Type' }} | {{ app()->getLocale() == 'ar' ? 'السعر' : 'Price' }} | {{ app()->getLocale() == 'ar' ? 'الحالة' : 'Status' }} | {{ app()->getLocale() == 'ar' ? 'سنة الصنع' : 'Year' }} | {{ app()->getLocale() == 'ar' ? 'العمليات' : 'Actions' }} |
|---|---|---|---|---|---|
|
@php
$displayImage = $car->mainImage ?? $car->images->first();
$imagePath = $displayImage ? $displayImage->path : null;
// Local placeholder if image fails or doesn't exist
$imageUrl = $imagePath ? (str_starts_with($imagePath, 'http') ? $imagePath : asset('storage/'.$imagePath)) : asset('images/login-bg.png');
@endphp
{{ $car->title }}
|
{{ $car->type }} | {{ number_format($car->price ?? $car->daily_price) }} {{ app()->getLocale() == 'ar' ? 'ر.س' : 'SAR' }} | @php $dynamicStatus = $car->dynamic_status; @endphp {{ $dynamicStatus['label'] }} | {{ $car->year }} | {{ app()->getLocale() == 'ar' ? '👁️ عرض' : '👁️ View' }} @can('edit_vehicles') {{ app()->getLocale() == 'ar' ? 'تعديل' : 'Edit' }} @endcan @can('delete_vehicles') @endcan |