@if ($paginator->hasPages())
<div class="pg no-print">
  @if ($paginator->onFirstPage())<span class="off">‹ Prev</span>@else<a href="{{ $paginator->previousPageUrl() }}">‹ Prev</a>@endif
  @foreach ($elements as $el)
    @if (is_string($el))<span class="off">{{ $el }}</span>@endif
    @if (is_array($el)) @foreach ($el as $p => $u)
      @if ($p == $paginator->currentPage())<span class="on">{{ $p }}</span>@else<a href="{{ $u }}">{{ $p }}</a>@endif
    @endforeach @endif
  @endforeach
  @if ($paginator->hasMorePages())<a href="{{ $paginator->nextPageUrl() }}">Next ›</a>@else<span class="off">Next ›</span>@endif
  <span class="off">{{ $paginator->total() }} records</span>
</div>
@endif
