<nav aria-label="Page navigation" class="text-center">
    <ul class="pagination">
        @if (($paginator->currentPage()) > 1)
            <li class="">
                <a href="{{page_path($paginator->currentPage() - 1)}}" aria-label="Next">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
        @endif


        @for($i = $paginator->currentPage() - 2;$i < $paginator->currentPage();$i++)
            @if ($i >= 1)
                <li class="">
                    <a href="{{page_path($i)}}" aria-label="Next">
                        <span aria-hidden="true">{{$i}}</span>
                    </a>
                </li>
            @endif
        @endfor

        <li class=""><a href="javascript:"
                        style="background-color: #ddd;color: currentcolor;">{{$paginator->currentPage()}}</a></li>

        @for($i = $paginator->currentPage() + 1;$i <= $paginator->lastPage();$i++)
            @if ($i <= $paginator->currentPage() + 3)
                <li class="">
                    <a href="{{page_path($i)}}" aria-label="Next">
                        <span aria-hidden="true">{{$i}}</span>
                    </a>
                </li>
            @endif
        @endfor

        @if ($paginator->currentPage() < $paginator->lastPage())
            <li class="">
                <a href="{{page_path($paginator->currentPage() + 1)}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </li>
        @endif
    </ul>

</nav>
