@push('include-css') @endpush @php $voucher_type = $voucher_type ?? null; $voucher_id = $voucher_id ?? null; $type = $type ?? null; $previous_image = null; $voucher_attachment = null; if($voucher_type && $voucher_id){ $voucher_attachment = \App\Models\VoucherAttachmentDetail::where(['reference_id' => $voucher_id , 'voucher_type' => $voucher_type]); if ($type) { $voucher_attachment->where([ 'type' => $type]); } $voucher_attachment = $voucher_attachment->first()->file_path ?? null; } if ($type == 'fingerprint_image') { $previous_image = $voucher_attachment ? loadAsset($voucher_attachment) : loadAsset('/asset/images/thumb_img.jpg'); } else { $previous_image = $voucher_attachment ? loadAsset($voucher_attachment) : loadAsset('/asset/images/placeholder.jpg'); } @endphp