@props([ 'paginator', ]) @php $isLengthAware = $paginator instanceof \Illuminate\Pagination\LengthAwarePaginator; $window = $isLengthAware ? \Illuminate\Pagination\UrlWindow::make($paginator) : ['first' => null, 'slider' => null, 'last' => null]; $elements = array_filter([ $window['first'], is_array($window['slider']) ? '...' : null, $window['slider'], is_array($window['last']) ? '...' : null, $window['last'], ]); @endphp @if ($isLengthAware) @endif