@foreach($pagination->links as $key => $link) @if($loop->first) @elseif($loop->last) @else @endif @if( $page <= 1 || $page >= $last_page || ( -2 <= $page - $current_page && $page - $current_page <= 2 ))
  • @if(str_contains($link->label, '«')) « @elseif(str_contains($link->label, '»')) » @else {!! $link->label !!} @endif
  • @else @if(isset($last_key)) @if($key - $last_key == 1) @else
  • ...
  • @endif @else
  • ...
  • @endif @endif @endforeach