@error('expense_category_id') {{ $message }} @enderror
@error('expense_name') {{ $message }} @enderror
@error('expense_amount') {{ $message }} @enderror
@error('expense_date') {{ $message }} @enderror
@if ($attachment && method_exists($attachment, 'temporaryUrl'))
@php
// Extract the file extension from the filename
$fileExtension = strtolower(pathinfo($attachment->getClientOriginalName(), PATHINFO_EXTENSION));
@endphp
@if (str_contains($attachment->getClientMimeType(), 'image') || in_array($fileExtension, ['jpg', 'jpeg', 'png', 'gif', 'bmp']))
 }})
@elseif (str_contains($attachment->getClientMimeType(), 'pdf') || $fileExtension == 'pdf')
@elseif (in_array($fileExtension, ['zip', 'doc', 'docx', 'xls', 'xlsx','pdf']))
 }})
@else
 }})
@endif
@else
 }})
@endif
@error('attachment')
{{ $message }}
@enderror