菜谱项目

default.blade.php 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. @if ($paginator->hasPages())
  2. <ul class="pagination">
  3. {{-- Previous Page Link --}}
  4. @if ($paginator->onFirstPage())
  5. <li class="disabled"><span>&laquo;</span></li>
  6. @else
  7. <li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
  8. @endif
  9. {{-- Pagination Elements --}}
  10. @foreach ($elements as $element)
  11. {{-- "Three Dots" Separator --}}
  12. @if (is_string($element))
  13. <li class="disabled"><span>{{ $element }}</span></li>
  14. @endif
  15. {{-- Array Of Links --}}
  16. @if (is_array($element))
  17. @foreach ($element as $page => $url)
  18. @if ($page == $paginator->currentPage())
  19. <li class="active"><span>{{ $page }}</span></li>
  20. @else
  21. <li><a href="{{ $url }}">{{ $page }}</a></li>
  22. @endif
  23. @endforeach
  24. @endif
  25. @endforeach
  26. {{-- Next Page Link --}}
  27. @if ($paginator->hasMorePages())
  28. <li><a href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
  29. @else
  30. <li class="disabled"><span>&raquo;</span></li>
  31. @endif
  32. </ul>
  33. @endif