{{-- resources/views/filament/pages/import-stocks-live.blade.php --}} {{-- Formulaire rendu par Filament --}} {{ $this->form }} {{-- Aperçu --}} @php $headers = $this->preview['headers_raw'] ?? []; $headersSql= $this->preview['headers_sql'] ?? []; $rows = $this->preview['sample'] ?? []; $missing = $this->preview['missing_in_db'] ?? []; $extra = $this->preview['extra_in_db'] ?? []; @endphp @if (!empty($rows))
@if (count($missing) || count($extra))
Attention colonnes :
@if (count($missing))
À ajouter en base :
{{ implode(', ', $missing) }} @endif @if (count($extra))
En base mais absentes du fichier :
{{ implode(', ', $extra) }} @endif
@endif

Aperçu ({{ count($rows) }} lignes)

@foreach ($headers as $h) @endforeach @foreach ($rows as $row) @foreach ($headers as $h) @php $val = $row[$h] ?? ''; if ($val instanceof \DateTimeInterface) $val = $val->format('Y-m-d H:i:s'); elseif (is_bool($val)) $val = $val ? '1' : '0'; elseif (is_array($val)) $val = json_encode($val, JSON_UNESCAPED_UNICODE); elseif (is_object($val)) $val = method_exists($val, '__toString') ? (string)$val : get_debug_type($val); @endphp @endforeach @endforeach
{{ $h }}
{{ $headersSql[$loop->index] ?? '' }}
{{ $val }}
@endif