@extends('admin.layout.app') @section('body')
| # | Date | Machinery | Liters | Unit Price | Total | Vendor | Attachments | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $expenses->firstItem() + $i }} | {{ optional($e->spent_at)->format('Y-m-d') ?? '—' }} | {{ optional($e->machinery)->name ?? '#' . $e->machinery_id }} | {{ number_format((float) $e->quantity_liters, 2) }} | {{ number_format((float) $e->unit_price, 2) }} | {{ number_format((float) $e->total_amount, 2) }} | {{ $e->vendor ?? '—' }} | @forelse($files as $path) @php $url = asset('storage/' . $path); $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); $isImg = in_array($ext, ['png','jpg','jpeg','gif','webp']); $isPdf = $ext === 'pdf'; @endphp @if ($isImg) img @elseif($isPdf) pdf @else file @endif @empty — @endforelse | |
| No records found. | ||||||||