Support the ongoing development of Laravel.io →
Requests Database Eloquent
Last updated 1 year ago.
0

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'))

0

@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.
0

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.

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.