@php $mode = $mode ?? 'show'; $layout = $layout ?? 'card'; $attachments = $attachments ?? ($voucher->attachments ?? collect()); $canUpload = isset($voucher) ? app(\App\Services\VoucherAttachmentService::class)->canUpload(auth()->user(), $voucher) : auth()->user()->hasPermission('vouchers', 'create'); $canView = auth()->user()->hasPermission('vouchers', 'view'); $attachmentService = app(\App\Services\VoucherAttachmentService::class); $allowedExtensions = implode(', ', array_map('strtoupper', config('attachments.allowed_extensions', []))); $maxMb = round(((int) config('attachments.max_size_kb', 10240)) / 1024, 1); $isInline = $layout === 'inline'; @endphp @if($canView || $canUpload) @if($isInline)
@else| File | Description | Uploaded By | Date | Actions |
|---|