Choose a new file only if you want to replace the
existing proof.
@if ($transaction->proof)
@php
$ext = pathinfo($transaction->proof, PATHINFO_EXTENSION);
@endphp
@if (in_array(strtolower($ext), ['jpg', 'jpeg', 'png']))
@else
View PDF
@endif
@else
No proof uploaded yet.
@endif