Created
February 1, 2017 17:36
-
-
Save Sopamo/5efc0739cdef75817fc2ba69617f39a6 to your computer and use it in GitHub Desktop.
A semantic UI pagination template for Laravel 5.3+
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->hasPages()) | |
<div class="ui pagination menu"> | |
{{-- Pagination Elements --}} | |
@foreach ($elements as $element) | |
{{-- "Three Dots" Separator --}} | |
@if (is_string($element)) | |
<div class="disabled item"> | |
{{ $element }} | |
</div> | |
@endif | |
{{-- Array Of Links --}} | |
@if (is_array($element)) | |
@foreach ($element as $page => $url) | |
@if ($page == $paginator->currentPage()) | |
<a class="active item"> | |
{{ $page }} | |
</a> | |
@else | |
<a href="{{ $url }}" class="item"> | |
{{ $page }} | |
</a> | |
@endif | |
@endforeach | |
@endif | |
@endforeach | |
</div> | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment