Pagination with dots

Submitted by wallacemaxters - 9 years 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