Last active
August 29, 2015 14:19
-
-
Save Tom-Millard/55c8fb214e8aaed9b31d to your computer and use it in GitHub Desktop.
Custom Laravel Pagination View with Font Awesome
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
@if ($paginator->getLastPage() > 1) | |
<ul class="pagination"> | |
<li> | |
<a href="{{ $paginator->getUrl(1) }}" class="pagination__item-{{ ($paginator->getCurrentPage() == 1) ? ' pagination__disabled' : '' }} btn pagination__option"><i class="fa fa-arrow-circle-left"></i> Previous</a> | |
</li> | |
@for ($i = 1; $i <= $paginator->getLastPage(); $i++) | |
<li> | |
<a href="{{ $paginator->getUrl($i) }}" class="pagination__item-{{ ($paginator->getCurrentPage() == $i) ? ' pagination__active' : '' }} btn pagination__option">{{ $i }}</a> | |
</li> | |
@endfor | |
<li> | |
<a href="{{ $paginator->getUrl($paginator->getCurrentPage()+1) }}" class="pagination__item-{{ ($paginator->getCurrentPage() == $paginator->getLastPage()) ? ' pagination__disabled' : '' }} btn pagination__option"> Next <i class="fa fa-arrow-circle-right"></i></a> | |
</li> | |
</ul> | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment