@props(['data', 'first'=>true]) @if ($data->lastPage() > 1) @php($range = 3) @php($hoverCss = 'transition-colors duration-300 transform bg-white hover:bg-secondary-300 hover:text-white ') @php($arrowCss = 'items-center justify-center w-6 w-6 text-gray-400 text-sm') @php($baseCss = 'hidden sm:flex items-center justify-center min-w-6 h-6 px-0.5 mr-1 ') @php($dotCss = $baseCss.' text-secondary-700 text-sm') @php($currentCss = $baseCss.'rounded-full text-xs font-bold text-white bg-primary-700') @php($itemsCss = $baseCss. $hoverCss. 'rounded-full text-xs font-bold text-gray-700')
@if($data->currentPage()==1) @else @endif @if (($data->currentPage() - $range) > 1) @endif @for ($lp = $range; $lp >= 1; $lp--) @php($pagecnt = $data->currentPage() - $lp) @if ($pagecnt > 0) {{ $pagecnt }} @endif @endfor {{ $data->currentPage() }} @for ($lp = 1; $lp <= $range; $lp++) @php($pagecnt = $data->currentPage() + $lp) @if ($data->lastPage() >= $pagecnt) {{ $pagecnt }} @endif @endfor @if ($data->lastPage() > ($data->currentPage() + $range)) ... @endif @if($data->currentPage()==$data->lastPage()) @else @endif
@endif