@if ($paginator->hasPages())
    <ul class="pagination mb-0">
        @if($paginator->onFirstPage())
        <li class="page-item disabled">
            <a class="page-link"><i class="fas fa-chevron-left"></i></a>
        </li>

        @else
        <li class="page-item">
            <a class="page-link" href="{{$paginator->previousPageUrl()}}">
                <i class="fas fa-chevron-left"></i></a>
            </li>
        @endif


        @foreach($elements as $element)
        @if(is_array($element))
        @foreach ($element as $page => $url)
        @if($page == $paginator->currentPage())
        <li class="page-item active">
            <a class="page-link" href="{{$url}}">{{$page}}</a></li>
        @else
        <li class="page-item"><a class="page-link" href="{{$url}}">{{$page}}</a></li>
        @endif
        @endforeach
        @else
        <li class="page-item"><span class="page-link" style="background-color: transparent; font-weight:bold;">{{$element}}</span></li>
        @endif
        @endforeach

        @if($paginator->hasMorePages())
        <li class="page-item"><a class="page-link" href="{{$paginator->nextPageUrl()}}" aria-label="Next"><i class="fas fa-chevron-right"></i></a></li>
        @else
        <li class="page-item disabled"><a class="page-link"><i class="fas fa-chevron-right"></i></a></li>
        @endif
    </ul>
@endif