I am trying create a paging on my page using the
request()->fullUrlWithQuery(["page" =>$page_number])
However, instead of getting the full url with query params with the page param appended to it. I get only the path with the page param appended
@for($i = 1; $i<=$pagesCount;$i++)
<li class="page-item {{request()->get("page") == $i ? 'active' :""}}">
<a class="page-link"
href="{{request()->fullUrlWithQuery(["page" =>$i])}}">{{$i}}</a>
</li>
@endfor
The original url
http://localhost:8899/offers/find?make=&year=&location=&drive=&color=&min_original_price=&max_original_price=¤cy=
and when I output:
{{request()->fullUrlWithQuery(["page" =>1])}}
</br>
{{request()->fullUrl()}}
</br>
I get
http://localhost:8899/offers/find?page=1
and
http://localhost:8899/offers/find?color=¤cy=&drive=&location=&make=&max_original_price=&min_original_price=&year=
respectively.