Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nav class="pagination" role="navigation" aria-label="pagination">
- @if ($paginator->hasPages())
- <ul class="pagination-list">
- {{-- Previous Page Link --}}
- @if ($paginator->onFirstPage())
- <li><a class="pagination-previous" title="This is the first page" disabled>Previous</a></li>
- @else
- <li><a class="pagination-previous" href="{{ $paginator->previousPageUrl() }}">Previous</a></li>
- @endif
- {{-- Pagination Elements --}}
- @foreach ($elements as $element)
- {{-- "Three Dots" Separator --}}
- @if (is_string($element))
- <li><span class="pagination-ellipsis">{{ $element }}</span></li>
- @endif
- {{-- Array Of Links --}}
- @if (is_array($element))
- @foreach ($element as $page => $url)
- @if ($page == $paginator->currentPage())
- <li><a class="pagination-link is-current">{{ $page }}</a></li>
- @else
- <li><a class="pagination-link" href="{{ $url }}">{{ $page }}</a></li>
- @endif
- @endforeach
- @endif
- @endforeach
- {{-- Next Page Link --}}
- @if ($paginator->hasMorePages())
- <li><a class="pagination-next" href="{{ $paginator->nextPageUrl() }}">Next Page</a></li>
- @else
- <li><a class="pagination-next" title="This is the last page" disabled>Next Page</a></li>
- @endif
- </ul>
- @endif
- </nav>
Add Comment
Please, Sign In to add comment