default.blade.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @if ($paginator->hasPages())
  2. <ul class="pagination" role="navigation">
  3. {{-- Previous Page Link --}}
  4. @if ($paginator->onFirstPage())
  5. <li class="disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
  6. <span aria-hidden="true">&lsaquo;</span>
  7. </li>
  8. @else
  9. <li>
  10. <a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">&lsaquo;</a>
  11. </li>
  12. @endif
  13. {{-- Pagination Elements --}}
  14. @foreach ($elements as $element)
  15. {{-- "Three Dots" Separator --}}
  16. @if (is_string($element))
  17. <li class="disabled" aria-disabled="true"><span>{{ $element }}</span></li>
  18. @endif
  19. {{-- Array Of Links --}}
  20. @if (is_array($element))
  21. @foreach ($element as $page => $url)
  22. @if ($page == $paginator->currentPage())
  23. <li class="active" aria-current="page"><span>{{ $page }}</span></li>
  24. @else
  25. <li><a href="{{ $url }}">{{ $page }}</a></li>
  26. @endif
  27. @endforeach
  28. @endif
  29. @endforeach
  30. {{-- Next Page Link --}}
  31. @if ($paginator->hasMorePages())
  32. <li>
  33. <a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">&rsaquo;</a>
  34. </li>
  35. @else
  36. <li class="disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
  37. <span aria-hidden="true">&rsaquo;</span>
  38. </li>
  39. @endif
  40. </ul>
  41. @endif