@if($purchaseRequest->invoices()->count() === 0)
No invoices attached.
@else
@if($purchaseRequest->attachment_notes)
{{ $purchaseRequest->attachment_notes }}
@endif
@foreach(['invoice_1','invoice_2','invoice_3','invoice_4','invoice_5'] as $i => $field)
@if($purchaseRequest->$field)
@php
$path = $purchaseRequest->$field;
$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
$isPdf = $ext === 'pdf';
$url = Storage::url($path);
@endphp
Invoice / Quote #{{ $i+1 }}
{{ $ext }}
@if(!$isPdf)

@endif
@endif
@endforeach
@endif