Knowledgebase

Pagination and Long Lists Print

  • phplaravel, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Handling many records.

WHY PAGINATE

Loading thousands of records exhausts memory and produces unusable pages.

WHAT THE FRAMEWORK PROVIDES

Pagination that queries only the current page and renders navigation.

WHAT TO CHOOSE

A page size suited to the content.

WHAT TO BE CAREFUL WITH

Counting total records on very large tables, which is expensive.

WHAT TO USE INSTEAD

The simpler pagination that does not count, where a total is unnecessary.

WHAT TO PRESERVE ACROSS PAGES

Filters and sorting, in the address.

WHY

Otherwise moving to page two discards the filter.

WHAT TO PROVIDE ON LONG LISTS

Sorting Filtering Search An indication of how many results exist

WHAT TO SHOW WHEN A FILTER EXCLUDES EVERYTHING

Which filter, and an offer to clear it.

Not simply an empty page.

WHAT TO CHECK

Query count, since list pages commonly trigger relationship loading per row.

WHAT TO TEST

The last page, and a page beyond the last.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot