default.blade.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. @if ($paginator->hasPages())
  2. <div class="layui-box layui-laypage">
  3. {{-- Previous Page Link --}}
  4. @if ($paginator->onFirstPage())
  5. <a class="layui-laypage-prev layui-disabled">&laquo;</a>
  6. @else
  7. <a class="layui-laypage-prev" href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a>
  8. @endif
  9. {{-- Pagination Elements --}}
  10. @foreach ($elements as $element)
  11. {{-- "Three Dots" Separator --}}
  12. @if (is_string($element))
  13. <a class="layui-laypage-spr">{{ $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="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{{ $page }}</em></a>
  20. @else
  21. <a href="{{ $url }}">{{ $page }}</a>
  22. @endif
  23. @endforeach
  24. @endif
  25. @endforeach
  26. {{-- Next Page Link --}}
  27. @if ($paginator->hasMorePages())
  28. <a class="layui-laypage-next" href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a>
  29. @else
  30. <a class="layui-laypage-next layui-disabled">&raquo;</a>
  31. @endif
  32. </div>
  33. @endif