theilen's avatar

Pagination for search results not working

It seems like the pagination for search results is buggy.

I search for "forms", scroll down and click on "2". On the next page the url is "https://laracasts.com/discuss?page=2&search=form" and on the bottom of the page the "2" is highlighted.

But I see the same results as on the first page.

0 likes
5 replies
theilen's avatar

Still not working.

Sorry, don't want to be a nuisance. But it's difficult to check if topics already exists when you can't get past the first page of the search results... ;-)

christopher's avatar

Can you share your code ?

For the pagination, did you append the query ?

For example:

{{ $posts->appends(Request::only('q'))->links() }}
theilen's avatar

I'm talking about the search results here on Laracasts... ;-)

JeffreyWay's avatar
Level 59

Looks like pagination for search results is being wonky. I'll fix this right now.

Update: fixed! Thanks for letting me know.

Please or to participate in this conversation.