@forelse($submission as $key => $data)
|
@if(is_array($data))
@php
$formatted = [];
foreach ($data as $rowKey => $row) {
$rowParts = [];
// Ensure $row is iterable
if (is_iterable($row)) {
foreach ($row as $colKey => $value) {
$rowParts[] = "$colKey: $value";
}
$formatted[] = "$rowKey: " . implode(', ', $rowParts);
} else {
$formatted[] = "$rowKey: $row";
}
}
@endphp
{!! htmlspecialchars(implode(' | ', $formatted)) !!}
@else
{{ htmlspecialchars($data) }}
@endif
|
@empty
@endforelse
@endforeach