SHARE
TWEET

Untitled

a guest Aug 21st, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @if ($paginator->hasPages())
  2.     <ul class="uk-pagination">
  3.         {{-- Previous Page Link --}}
  4.         @if ($paginator->onFirstPage())
  5.             <li class="uk-disabled"><span>&laquo;</span></li>
  6.         @else
  7.             <li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
  8.         @endif
  9.  
  10.         {{-- Pagination Elements --}}
  11.         @foreach ($elements as $element)
  12.             {{-- "Three Dots" Separator --}}
  13.             @if (is_string($element))
  14.                 <li class="uk-disabled"><span>{{ $element }}</span></li>
  15.             @endif
  16.  
  17.             {{-- Array Of Links --}}
  18.             @if (is_array($element))
  19.                 @foreach ($element as $page => $url)
  20.                     @if ($page == $paginator->currentPage())
  21.                         <li class="uk-active"><span>{{ $page }}</span></li>
  22.                     @else
  23.                         <li><a href="{{ $url }}">{{ $page }}</a></li>
  24.                     @endif
  25.                 @endforeach
  26.             @endif
  27.         @endforeach
  28.  
  29.         {{-- Next Page Link --}}
  30.         @if ($paginator->hasMorePages())
  31.             <li><a href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
  32.         @else
  33.             <li class="uk-disabled"><span>&raquo;</span></li>
  34.         @endif
  35.     </ul>
  36. @endif
RAW Paste Data
Top