@php $isList = is_array($value) && array_is_list($value); $isRowList = $isList && $value !== [] && collect($value)->every(fn ($item) => is_array($item) && ! array_is_list($item)); @endphp @if ($value === null || $value === []) — @elseif (is_bool($value)) {{ $value ? 'Yes' : 'No' }} @elseif (is_string($value) && preg_match('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/', $value)) {{ \Carbon\Carbon::parse($value)->format('d M Y, h:i:s A') }} @elseif (! is_array($value)) {{ $value }} @elseif ($isRowList) @php $columns = collect($value)->flatMap(fn ($row) => array_keys($row))->unique()->values(); @endphp @foreach ($columns as $column) @endforeach @foreach ($value as $index => $row) @foreach ($columns as $column) @endforeach @endforeach
#{{ \Illuminate\Support\Str::headline((string) $column) }}
{{ $index + 1 }}@include('filament.pages.astrology.partials.value', ['value' => $row[$column] ?? null])
@elseif ($isList && collect($value)->every(fn ($item) => ! is_array($item))) {{ collect($value)->map(fn ($item) => is_bool($item) ? ($item ? 'Yes' : 'No') : $item)->implode(', ') }} @else @foreach ($value as $key => $item) @endforeach
{{ is_int($key) ? $key : \Illuminate\Support\Str::headline($key) }} @include('filament.pages.astrology.partials.value', ['value' => $item])
@endif