Laravel5 has two lists on one page. How to separate pages?

Source: Internet
Author: User
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?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.