{{-- Reusable read-only data table with search & export --}}
{{ $title ?? 'Data' }} {{ method_exists($rows ?? [], 'total') ? $rows->total() : count($rows ?? []) }}
@if(isset($exportType)) @endif
@foreach($headers as $header) @endforeach @forelse($rows as $i => $row) @foreach($columns as $col) @endforeach @empty @endforelse
No{{ $header }}
{{ method_exists($rows, 'firstItem') && $rows->firstItem() ? $rows->firstItem() + $i : $i + 1 }}{{ data_get($row, $col, '-') }}
{{ $emptyMsg ?? 'Belum ada data.' }}
@if(isset($rows) && method_exists($rows, 'links'))
{{ $rows->withQueryString()->links() }}
@endif