@if ($paginator->hasPages()) @php $cur = $paginator->currentPage(); $last = $paginator->lastPage(); $from = max(1, $cur - 2); $to = min($last, $cur + 2); @endphp @if ($paginator->onFirstPage()) ‹ {{ __('前へ') }} @else ‹ {{ __('前へ') }} @endif @if ($from > 1) 1 @if ($from > 2)…@endif @endif @foreach ($paginator->getUrlRange($from, $to) as $page => $url) @if ($page == $cur) {{ $page }} @else {{ $page }} @endif @endforeach @if ($to < $last) @if ($to < $last - 1)…@endif {{ $last }} @endif @if ($paginator->hasMorePages()) {{ __('次へ') }} › @else {{ __('次へ') }} › @endif