Products List
Exported on: {{ date('d M Y, H:i A') }}
Total Records: {{ is_countable($records) ? count($records) : 0 }}
@if(!empty($records))
@php
// Get the first record to extract keys (works for array or collection)
$firstRecord = is_array($records) ? $records[0] : $records->first();
$headings = is_array($firstRecord) ? array_keys($firstRecord) : ($firstRecord ? $firstRecord->toArray() : []);
@endphp
@foreach($headings as $heading)
| {{ $heading }} |
@endforeach
@endif
@foreach($records as $row)
@php
$rowArray = is_array($row) ? $row : $row->toArray();
@endphp
@foreach($rowArray as $value)
| {{ $value }} |
@endforeach
@endforeach