{{ $file->name }}
@if($file->mime) @endif @if($file->filesize) @php $size = (int) $file->filesize; if ($size >= 1024 * 1024) { $formattedSize = round($size / (1024 * 1024), 2) . ' MB'; } elseif ($size >= 1024) { $formattedSize = round($size / 1024, 2) . ' KB'; } else { $formattedSize = $size . ' B'; } @endphp @endif
@if($related)
@if(class_basename($file->fileable->getMorphClass()) == 'Person') {{ $file->fileable->name }} @elseif(class_basename($file->fileable->getMorphClass()) == 'Organization') {{ $file->fileable->name }} @endif
@endif
{{ $file->created_at->diffForHumans() }} @if($file->createdByUser) — {{ $file->createdByUser->name }} @endif