@php $current_url = explode("/",$_SERVER['REQUEST_URI'])[count(explode("/",$_SERVER['REQUEST_URI']))-1]; $page = app('request')->input('page'); if (app('request')->input('filtru')=='1') { $symbol='&'; $current_url = str_replace('&page='.$page,'',$current_url); }else{ $current_url = explode("?",$_SERVER['REQUEST_URI'])[0]; $symbol='?'; } $preview_page = $current_url.$symbol.'page='.($page-1); $next_page = $current_url.$symbol.'page='.($page+1); @endphp @if ($paginator->hasPages()) @endif