Pagination with dots

Submitted by wallacemaxters - 1 year ago

Pagination with dots in laravel

@for ($i = $initial = max(1, $paginator->getCurrentPage() - 15), $l = min($initial + 20, $paginator->getLastPage()); $i <= $l; $i++)

    @if($paginator->getCurrentPage() == $i)
        <a class="item active">{{ $i }}</a>
    @else
        <a href="{{ $paginator->getUrl($i) }}">{{ $i }}</a>
    @endif
    
@endfor
comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks