duanfei1268 2016-10-24 14:06
浏览 76
已采纳

分页laravel用GET传递数据

I have a filter for example example.com/mypage?page=2&name=Alex

And I have a lot of data with this name and the limit on pagination is 15. My problem is this. When I make the filter everything it's ok because when I press a button i'm sending with GET the values, and the first page it looks good, but when I press for the page 2 on laravel pagination the parameters are removed and it looks like example.com/mypage?page=2. What can I do?

  • 写回答

1条回答 默认 最新

  • douwu5428 2016-10-24 14:19
    关注

    You can just append additional parameters as described here

    $users->appends(['name' => 'Alex'])->links();
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?