There are two lists on a page. You can add parameters to the render, but the page is automatically completed. How to calculate the corresponding page by parameters? Thank you for having two lists on one page, you can add parameters in the render, but the page is automatically completed. How can we calculate the corresponding page by parameters? Thank you.
Reply content:
There are two lists on a page. You can add parameters to the render, but the page is automatically completed. How can we solve the corresponding page by parameters? Thank you.
After finding the answer, there is a method setPageName () in the laravel paging class to customize the request Name of the page number. For example, the default value is page = 1, this method can be used to separate the pages of two lists on the same page. For example, userList uses upage = 1 and groupList uses gpage = 1, so that multiple lists on the same page do not interfere with each other, but ~~~~~~~~~ However, this method has a bug in L5.0, And the 'page' value is hardcoded, so nothing you define will take effect.
Bug here
GitHub Problem with custom pageName for Pagination #8000
Unfortunately, the bug fix is not merged to L5.0 but to L5.1.
GitHub 5.0 Use custom page name for Paginator #8475
Then I fixed my code according to the above steps, but I still don't know how to upgrade L5.1 because of environment problems (PHP 5.4.39). So as I said above, I used Ajax to pagination, if everyone knows the cause of the problem, thank you very much;
Ajax paging is recommended for two lists.
Can you use your ajax paging code to worship ing?