@if ($paginator->hasPages())
    <nav class="pagination-links" role="navigation">
        {{-- Previous --}}
        @if ($paginator->onFirstPage())
            <span class="disabled">&laquo; 上一页</span>
        @else
            <a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo; 上一页</a>
        @endif

        {{-- Numbers --}}
        @foreach ($elements as $element)
            @if (is_string($element))
                <span class="disabled">{{ $element }}</span>
            @endif
            @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 --}}
        @if ($paginator->hasMorePages())
            <a href="{{ $paginator->nextPageUrl() }}" rel="next">下一页 &raquo;</a>
        @else
            <span class="disabled">下一页 &raquo;</span>
        @endif
    </nav>
@endif
