Created
October 2, 2017 18:10
-
-
Save drakakisgeo/e6df4bc55dc3c42c3f64123880b9c7c6 to your computer and use it in GitHub Desktop.
Zurb foundation 6.4 paginator for Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if ($paginator->hasPages()) | |
<ul class="pagination" role="navigation" aria-label="Pagination"> | |
{{-- Previous Page Link --}} | |
@if ($paginator->onFirstPage()) | |
<li class="pagination-previous disabled"></li> | |
@else | |
<li class="pagination-previous"><a href="{{ $paginator->previousPageUrl() }}" aria-label="Previous page"></a></li> | |
@endif | |
{{-- Pagination Elements --}} | |
@foreach ($elements as $element) | |
{{-- "Three Dots" Separator --}} | |
@if (is_string($element)) | |
<li class="ellipsis"></li> | |
@endif | |
{{-- Array Of Links --}} | |
@if (is_array($element)) | |
@foreach ($element as $page => $url) | |
@if ($page == $paginator->currentPage()) | |
<li class="current"><span class="show-for-sr">You're on page</span> {{ $page }}</li> | |
@else | |
<li><a href="{{ $url }}">{{ $page }}</a></li> | |
@endif | |
@endforeach | |
@endif | |
@endforeach | |
{{-- Next Page Link --}} | |
@if ($paginator->hasMorePages()) | |
<li class="pagination-next"><a href="{{ $paginator->nextPageUrl() }}" aria-label="Next page"></a></li> | |
@else | |
<li class="pagination-next disabled"></li> | |
@endif | |
</ul> | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment