Guest User

Untitled

a guest
Feb 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <nav class="pagination" role="navigation" aria-label="pagination">
  2. @if ($paginator->hasPages())
  3. <ul class="pagination-list">
  4. {{-- Previous Page Link --}}
  5. @if ($paginator->onFirstPage())
  6. <li><a class="pagination-previous" title="This is the first page" disabled>Previous</a></li>
  7. @else
  8. <li><a class="pagination-previous" href="{{ $paginator->previousPageUrl() }}">Previous</a></li>
  9. @endif
  10.  
  11. {{-- Pagination Elements --}}
  12. @foreach ($elements as $element)
  13. {{-- "Three Dots" Separator --}}
  14. @if (is_string($element))
  15. <li><span class="pagination-ellipsis">{{ $element }}</span></li>
  16. @endif
  17.  
  18. {{-- Array Of Links --}}
  19. @if (is_array($element))
  20. @foreach ($element as $page => $url)
  21. @if ($page == $paginator->currentPage())
  22. <li><a class="pagination-link is-current">{{ $page }}</a></li>
  23. @else
  24. <li><a class="pagination-link" href="{{ $url }}">{{ $page }}</a></li>
  25. @endif
  26. @endforeach
  27. @endif
  28. @endforeach
  29.  
  30. {{-- Next Page Link --}}
  31. @if ($paginator->hasMorePages())
  32. <li><a class="pagination-next" href="{{ $paginator->nextPageUrl() }}">Next Page</a></li>
  33. @else
  34. <li><a class="pagination-next" title="This is the last page" disabled>Next Page</a></li>
  35. @endif
  36. </ul>
  37. @endif
  38. </nav>
Add Comment
Please, Sign In to add comment