📅  最后修改于: 2022-03-11 14:54:48.859000             🧑  作者: Mango
@if (isset($paginator) && $paginator->lastPage() > 1)
currentPage() - $interval;
if($from < 1){
$from = 1;
}
$to = $paginator->currentPage() + $interval;
if($to > $paginator->lastPage()){
$to = $paginator->lastPage();
}
?>
@if($paginator->currentPage() > 1)
-
-
@endif
@for($i = $from; $i <= $to; $i++)
currentPage() == $i;
?>
-
{{ $i }}
@endfor
@if($paginator->currentPage() < $paginator->lastPage())
-
-
@endif
@endif