semantic-ui.blade.php 1.6KB

12345678910111213141516171819202122232425262728293031323334353637
  1. @if ($paginator->hasPages())
  2. <div class="ui pagination menu" role="navigation">
  3. {{-- Previous Page Link --}}
  4. @if ($paginator->onFirstPage())
  5. <a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
  6. @else
  7. <a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
  8. @endif
  9. {{-- Pagination Elements --}}
  10. @foreach ($elements as $element)
  11. {{-- "Three Dots" Separator --}}
  12. @if (is_string($element))
  13. <a class="icon item disabled" aria-disabled="true">{{ $element }}</a>
  14. @endif
  15. {{-- Array Of Links --}}
  16. @if (is_array($element))
  17. @foreach ($element as $page => $url)
  18. @if ($page == $paginator->currentPage())
  19. <a class="item active" href="{{ $url }}" aria-current="page">{{ $page }}</a>
  20. @else
  21. <a class="item" href="{{ $url }}">{{ $page }}</a>
  22. @endif
  23. @endforeach
  24. @endif
  25. @endforeach
  26. {{-- Next Page Link --}}
  27. @if ($paginator->hasMorePages())
  28. <a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
  29. @else
  30. <a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
  31. @endif
  32. </div>
  33. @endif