@if ($paginator->hasPages())
    <div class="pages">

        {{-- Previous Page Link --}}
        @if ($paginator->onFirstPage())
            <span class="disabled">上一页</span>
        @else
            <a href="{{ $paginator->previousPageUrl() }}">上一页</a>
        @endif

        {{-- Pagination Elements --}}
        @foreach ($elements as $element)
            {{-- Array Of Links --}}
            @if (is_array($element))
                @foreach ($element as $page => $url)
                    @if ($page == $paginator->currentPage())
                        <span class="current">{{ $page }}</span>
                    @else
                        <a href="{{ $url }}">{{ $page }}</a>
                    @endif
                @endforeach
            @endif
        @endforeach

        {{-- Next Page Link --}}
        @if ($paginator->hasMorePages())
            <a href="{{ $paginator->nextPageUrl() }}">下一页</a>
        @else
            <span class="disabled">下一页</span>
        @endif
    </div>
@endif
