{{-- @include('checkout::partials.line-custom-fields', ['line' => $line]) A cart or order line's custom-field answers (meta.custom_fields, written by CartController::customFieldsMeta()) — label/value pairs. A file answer links to the file through a temporary signed URL (CustomFieldFileController), minted fresh on every render, with a thumbnail when the browser can display the format (HEIC can't be shown outside Safari, so it gets the name only). --}} @php $fields = $line->meta['custom_fields'] ?? []; $previewable = ['image/jpeg', 'image/png', 'image/webp', 'image/gif']; @endphp @if (! empty($fields))
@foreach ($fields as $field)
{{ $field['label'] }}
@if ($field['type'] === 'file') @php $fileUrl = \Illuminate\Support\Facades\URL::temporarySignedRoute( 'checkout.custom-field-file', now()->addHours(2), ['locale' => app()->getLocale(), 'disk' => $field['disk'], 'path' => $field['path']], ); @endphp @if (in_array($field['mime'] ?? null, $previewable, true)) @endif {{ $field['value'] }} @else {{ $field['value'] }} @endif
@endforeach
@endif