Skip to content

Instantly share code, notes, and snippets.

@tokoiwesley
Created February 14, 2018 08:45
Show Gist options
  • Save tokoiwesley/604476ad52e02bf194ae3acdeb6cacc9 to your computer and use it in GitHub Desktop.
Save tokoiwesley/604476ad52e02bf194ae3acdeb6cacc9 to your computer and use it in GitHub Desktop.
Simple Semantic UI Pagination in Laravel
<?php
/**
* Semantic UI
* @example $pages->links('vendor.pagination.simple-semantic-ui', ['paginator' => $pages])
* @example @include('vendor.pagination.simple-semantic-ui', ['paginator' => $pages])
**/
?>
@if ($paginator->lastPage() > 1)
<div class="ui pagination menu">
@for ($i = 1; $i <= $paginator->lastPage(); $i++)
<a href="{{ $paginator->url($i) }}" class="{{ ($paginator->currentPage() == $i) ? ' active' : '' }} item">
{{ $i }}
</a>
@endfor
</div>
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment