Halaman {{ $users->currentPage() }} dari {{ $users->lastPage() }} ({{ $users->total() }} data)
@php $current = $users->currentPage(); $last = $users->lastPage(); $start = max(1, $current - 2); $end = min($last, $current + 2); @endphp
@if ($users->onFirstPage()) @else Sebelumnya @endif
@if ($start > 1) 1 @if ($start > 2) ... @endif @endif @for ($i = $start; $i <= $end; $i++) @if ($i === $current) @else {{ $i }} @endif @endfor @if ($end < $last) @if ($end < $last - 1) ... @endif {{ $last }} @endif
@if ($users->hasMorePages()) Berikutnya @else @endif