{{-- Daftar berformat SATU dengan paginasi server (untuk data yang barisnya mahal dihitung): filter, cari, dan halaman lewat GET. --}} @php $query = request()->query('q'); $query = is_string($query) ? $query : ''; $last = $rows->lastPage(); $current = $rows->currentPage(); $start = max(1, min($current - 2, $last - 4)); $window = range($start, $start + min(5, $last) - 1); $per = $rows->perPage(); @endphp {{-- Kontrol memakai atribut form="satu-form" agar tabel (dengan tautan dan formulir aksi) tidak berada di dalam formulir pencarian. --}}
@if ($filters)
@foreach ($filters as $filter) @endforeach
@endif
@if ($searchable) @endif
@foreach ($columns as $col) @endforeach @foreach ($rows as $row) @php $id = $keyOf($row); @endphp @foreach ($columns as $col) @php $val = isset($col['value']) ? $col['value']($row) : data_get($row, $col['key']); $tone = isset($col['badge']) ? $col['badge']($row) : null; @endphp @endforeach @endforeach
($col['class'] ?? null) === 'num'])>{{ $col['label'] }}Aksi
($col['class'] ?? null) === 'num', 'table__title' => $loop->first])> @if ($tone !== null && $val !== null && $val !== '') {{ $val }} @else {{ $val === null || $val === '' ? '-' : $val }} @endif @foreach ($rowActions($row) as $action) {{ $action['label'] }} @endforeach @if ($abilities['show']) @endif
@if ($rows->isEmpty())

{{ request()->query() ? 'Tidak ada data yang cocok dengan pencarian atau filter.' : 'Belum ada data '.Str::lower($names['plural']).'.' }}

@endif

Halaman {{ $current }} dari {{ $last }} ({{ $rows->total() }} data)