Support the ongoing development of Laravel.io →
Requests Breeze
Last updated 1 year ago.
0
moderator Solution

Hello @danielsc87,

If I understand your problem correct I think you need to add a call to the withQueryString() function after your paginate call.

$users = User::paginate(15)->withQueryString();

See for the this and other options: https://laravel.com/docs/9.x/pagination#appending-query-string-values

danielsc87 liked this reply

1
Solution selected by @danielsc87

Thank you that worked perfect,

below is what i was using before can this be adjusted or its ok to leave as is, onchange was the row selector and the function copy was the search input from a button

<script> document.getElementById('pagination').onchange = function() { window.location = "{!! $hubsearch->url(1) !!}&items=" + this.value; }; function copy() { var $search = document.getElementById('blookup').value; window.location = "{!! $hubsearch->url(1) !!}&blookup="+$search; } </script>
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.