Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Correct pagination message #39894

Merged
merged 1 commit into from
Dec 6, 2021
Merged

[8.x] Correct pagination message #39894

merged 1 commit into from
Dec 6, 2021

Conversation

xanderificnl
Copy link
Contributor

When accessing an out-of-bounds page number, i.e. ?page=999999, the methods firstItem() and lastItem() return null causing this template to render “Showing to of 28 results” which isn't user-friendly.

This PR catches that edge case and renders “Showing 0 of 28 results” instead.

I don't believe this PR will break any functionality.

When `firstItem()` is null, the template returns “Showing to of 28 results” 

This PR does a quick check, and when needed will render “Showing 0 of 28 results” instead.
@xanderificnl xanderificnl changed the title Corrects pagination message [8.X] Corrects pagination message Dec 4, 2021
@GrahamCampbell GrahamCampbell changed the title [8.X] Corrects pagination message [8.x] Corrects pagination message Dec 5, 2021
@GrahamCampbell GrahamCampbell changed the title [8.x] Corrects pagination message [8.x] Correct pagination message Dec 5, 2021
@taylorotwell taylorotwell merged commit e772d1d into laravel:8.x Dec 6, 2021
@xanderificnl xanderificnl deleted the patch-2 branch December 7, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants