Created
August 29, 2016 02:32
-
-
Save JVMartin/9dc999e2b6098d1bdfefd9e5dacf3497 to your computer and use it in GitHub Desktop.
Laravel 5.3 Pagination View for Foundation for Sites 6
This file contains 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
<ul class="pagination" aria-label="Pagination"> | |
<!-- Previous Page Link --> | |
@if ($paginator->onFirstPage()) | |
<li class="pagination-previous disabled"></li> | |
@else | |
<li class="pagination-previous"> | |
<a href="{{ $paginator->previousPageUrl() }}" rel="prev"></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">{{ $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() }}" rel="next"></a> | |
</li> | |
@else | |
<li class="pagination-next disabled"></li> | |
@endif | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simply put this file in
resources/views/vendor/pagination/foundation-6.blade.php
and then use it like this: