@php
$frontType = pathinfo($document->front_image, PATHINFO_EXTENSION);
$isImage = in_array(strtolower($frontType), ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']);
$isPdf = strtolower($frontType) === 'pdf';
@endphp
@if($isImage)

@elseif($isPdf)
@else
@endif