@extends('layouts.employee') @section('page-title', 'Edit Expense') @section('page-subtitle', 'Edit expense — same sheet layout as Add') @section('content') @php // Normalize existing files into array of ['path'=>..., 'original_name'=>...] $existingFiles = []; if (isset($expense)) { if (!empty($expense->proof_paths) && is_array($expense->proof_paths)) { $existingFiles = $expense->proof_paths; } elseif (!empty($expense->proof_path)) { $existingFiles = [['path' => $expense->proof_path, 'original_name' => $expense->proof_original_name ?? basename($expense->proof_path)]]; } } @endphp {{-- TOP SECTION --}}
Edit your expense using the same sheet layout as Add Expenses.
Expense Date: {{ $expense->expense_date->format('d M Y') }}
Update the row below and save.