vk011's avatar

Laravel 4 pagination links ignore existing GET parameters

Hello, I have a search in Laravel 4. After search for sh my url is this:

http://localhost/musiter/product/search-products/24?query=sh

I also have pagination there, but the pagination for the second link for example is:

http://localhost/musiter/product/search-products/24?page=2

instead of:

http://localhost/musiter/product/search-products/24?query=sh&page=2

Any way to fix this?

0 likes
1 reply
vk011's avatar
vk011
OP
Best Answer
Level 1

Got the answer on stackoverflow, $paginator->appends(['query' => $value])->links();

Please or to participate in this conversation.