Files @php $iconBase = asset('images/ladill-icons'); $fmtBytes = function (int $bytes) { if ($bytes >= 1073741824) return number_format($bytes / 1073741824, 2).' GB'; if ($bytes >= 1048576) return number_format($bytes / 1048576, 1).' MB'; return number_format($bytes / 1024, 0).' KB'; }; $fileRows = $files->map(fn ($file) => [ 'id' => $file->id, 'name' => $file->original_name, 'size' => $file->humanSize(), 'downloads' => $file->downloads_total, 'modified' => $file->updated_at?->format('M j, Y') ?? '—', 'shareUrl' => $file->transfer->qrCode?->publicUrl() ?? '', 'downloadUrl' => route('transfer.files.download', $file), 'shared' => $file->transfer->recipient_email !== null || $file->downloads_total > 0, ])->values(); @endphp
{{-- Header --}}

Files

{{ $fmtBytes($storageBytes) }} stored (~GHS {{ number_format($storageGb * $pricePerGb, 2) }}/month)

{{-- Create or upload --}}
{{-- Breadcrumbs --}} {{-- Action toolbar + file list --}}
@if($folderTransfer) @endif
@if($files->isEmpty() && ($folderTransfer || $folders->isEmpty() || $search !== ''))
@if($search !== '') No files match your search. @elseif($folderTransfer) This folder is empty. Upload files or move items here. @else No files yet. Use Create or upload to add files. @endif
@else {{-- User-created folders (root only) --}} @if(! $folderTransfer && $search === '') @foreach($folders as $folder) @endforeach @endif @foreach($files as $file) @endforeach
Name Size

{{ $folder->title }}

{{ $folder->files_count }} item{{ $folder->files_count === 1 ? '' : 's' }}

{{ $file->original_name }}

{{ $file->humanSize() }}
@if($files->isNotEmpty())
{{ $files->total() }} file{{ $files->total() === 1 ? '' : 's' }} Showing {{ $files->firstItem() }}–{{ $files->lastItem() }}
@endif @endif
@if($files->hasPages())
{{ $files->links() }}
@endif {{-- Create folder modal --}}

New folder

@csrf @if($folderTransfer) @endif
{{-- Duplicate file modal --}}

A file with this name already exists so we couldn't upload .

Add it as a new version of the existing file, or keep them both.

{{-- Move modal --}}

Move to folder

Group selected files into a folder you created.

@csrf
{{-- Upload overlay --}}
Uploading…
{{-- Toast --}}