Support the ongoing development of →
Requests Database Eloquent
Last updated 2 years ago.

i suggest you pass the search query params using GET rather than POST. then you can append all the query params back in to the paginator urls using $paginatedCollection->append(Input::except('page'))


@astroanu, I'd prefer to use POST variables here so as to not clutter up the URL, and to keep the parameters of the search secure. While we're not using any parameters that need to be secured yet, I may need to search via SSN down the road, and I don't want that passed around via GET variables.

For now, I've gotten it working via GET using the appends() method like you suggested, thanks for the suggestion there. I'm still hoping I can find a way to do it while keeping the variables in POST, but this is a good start, at least pagination is working now. Thanks for the guidance!

Last updated 7 years ago.

so, POST could still be used.

you will need to write your own front end script (jquery or something) to catch the paginator page link click event. then take that url and resubmit using your POST ajax call along with the post data. kinda sloppy but should work okay.


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.