@props([ 'documents' => [], 'lead_id' => null ])

Documentos

@if($documents && $documents->count() > 0)
@foreach ($documents as $document) @php $isImage = str_starts_with($document->mime_type, 'image/'); $filename = $document->file_name; $extension = pathinfo($filename, PATHINFO_EXTENSION); $basename = pathinfo($filename, PATHINFO_FILENAME); $limited_basename = Str::limit($basename, 8, '...'); $display_name = $limited_basename . '.' . $extension; @endphp
@if($isImage) @php $urlImg = asset('storage/' . $document->file_path); @endphp img adjunto @else

{{ $display_name }}

@endif
@endforeach
@if($lead_id)
Descargar todos los archivos
@endif @else

Aún no hay archivos adjuntos.

@endif