Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dionarap's avatar

Pagination issue with search query

I'm getting an issue where that if i run a search with constraints on a set of data and the returned data is more than my pagination number then when i press on page two of the search results, it returns me to the default query (localhost/page=2) and cancels/ignores the search which had been run. Is there a way around this?

0 likes
2 replies
jlrdw's avatar

Did you append the querystring?

toby's avatar

How do you render your links? Try to use

{{ $entries->appends(request()->all())->render() }}

Please or to participate in this conversation.