@if ($paginator->hasPages())
    <ul class="pagination">
        @if ($paginator->onFirstPage())
            <li class="disabled"><a href="#"><span aria-hidden="true">上一页</span></a></li>
        @else
            <li>
                <a href="{{ $paginator->previousPageUrl() }}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
        @endif
        @foreach ($elements as $element)
            {{-- "Three Dots" Separator --}}
            @if (is_string($element))
                <li class="page-item disabled" aria-disabled="true">
                    <span class="page-link">{{ $element }}</span>
                </li>
            @endif

            {{-- Array Of Links --}}
            @if (is_array($element))
                @foreach ($element as $page => $url)
                    @if ($page == $paginator->currentPage())
                        <li class="active"><a href="#">{{ $page }} <span class="sr-only">(current)</span></a></li>
                    @else
                        <li><a href="{{ $url }}">{{ $page }} </a></li>
                    @endif
                @endforeach
            @endif
        @endforeach
        @if ($paginator->hasMorePages())
            <li><a href="{{ $paginator->nextPageUrl() }}" aria-label="Next"><span aria-hidden="true">下一页</span></a></li>
        @else
            <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">下一页</span></a></li>
        @endif

    </ul>

@endif
