@if ($paginator->hasPages())
    <form action="{{ url()->current() }}" method="get" accept-charset="utf-8">
        <div class="tcdPageCode">
            {{-- Previous Page Link --}}
            @if ($paginator->onFirstPage())
                <span class="disabled">上一页</span>
            @else
                <a href="{{ $paginator->previousPageUrl() }}" class="prevPage">上一页</a>
            @endif

            {{-- Pagination Elements --}}
            @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())
                            <span class="current">{{ $page }}</span>
                        @else
                            <a href="{{ $url }}" class="tcdNumber">{{ $page }}</a>
                        @endif
                    @endforeach
                @endif
            @endforeach

            {{-- Next Page Link --}}
            @if ($paginator->hasMorePages())
                <a href="{{ $paginator->nextPageUrl() }}" class="nextPage">下一页</a>
            @else
                <span class="disabled">下一页</span>
            @endif
            {{--            <li class="page-item disabled" aria-disabled="true">--}}
            {{--                <span class="page-link" aria-hidden="true">共{{ $paginator->total() }}条</span>--}}
            {{--            </li>--}}

        </div>
    </form>
@endif
