{$pages = app('query')->pages;} @if ($pages > 0) {$currentPage = get()->has('page') ? intval(get()->page) : 1;}
@if ($currentPage == $pages or $currentPage > $pages) {$lastPage = $pages-1;} Prev @endif {$start = ($currentPage > 2) ? ($currentPage-1) : ($currentPage == 1 ? 1 : 1);} {$drawTotal = ($start == 1) ? ($start + 3) : ($start + 3);} @if ($currentPage < $pages) @for ($x = $start and $x <= $drawTotal then $x++) @if ($x <= $pages) {$x} @endif @endfor @endif @if ($currentPage < $pages) {$nextPage = $currentPage+1;} Next @endif
@endif