@php $filePath = $getRecord()->file; $extension = pathinfo($filePath, PATHINFO_EXTENSION); @endphp @if (in_array($extension, ['pdf', 'jpg', 'jpeg', 'png'])) @php $url = asset('storage/' . $filePath); @endphp Lihat file @else {{ $getRecord()->file }} Tidak Ada file @endif