{{-- SELECT ITEMS PER PAGE --}}
    @foreach (\App\Enums\Pagination\ItemsPerPaginationEnum::toArray() as $itemsPerPaginationEnum)
  • {{ $itemsPerPaginationEnum->value }}
  • @endforeach
@if ($paginator->hasPages()) {{-- PAGINATION --}}
    {{-- PREVIOUS PAGE --}}
  • onFirstPage()) href="{{ $paginator->previousPageUrl() }}" @endif rel="prev" @if ($paginator->onFirstPage()) aria-hidden="true" @endif>
  • {{-- FIRST PAGE --}} @if ($paginator->currentPage() > 3)
  • 1
  • @endif {{-- HIDE PAGES TOO FAR --}} @if ($paginator->currentPage() > 4)
  • ...
  • @endif {{-- SHOW ACTUAL PAGES + N-2/N+2 --}} @foreach (range(1, $paginator->lastPage()) as $i) @if ($i >= $paginator->currentPage() - 2 && $i <= $paginator->currentPage() + 2) @if ($i == $paginator->currentPage())
    • @for ($i = 1; $i <= $paginator->lastPage(); $i++)
    • {{ $i }}
    • @endfor
  • @else
  • {{ $i }}
  • @endif @endif @endforeach {{-- HIDE PAGES TOO FAR --}} @if ($paginator->currentPage() < $paginator->lastPage() - 3)
  • ...
  • @endif {{-- LAST PAGE --}} @if ($paginator->currentPage() < $paginator->lastPage() - 2)
  • {{ $paginator->lastPage() }}
  • @endif {{-- NEXT PAGE --}}
  • hasMorePages()) href="{{ $paginator->nextPageUrl() }}" @endif rel="next" @if (!$paginator->hasMorePages()) aria-hidden="true" @endif>
@endif