From 3851ea9d8d49cb5c0a0f7919c1da49a9791a1e76 Mon Sep 17 00:00:00 2001 From: Josh Hanley Date: Tue, 23 Jun 2026 09:23:36 +1000 Subject: [PATCH 1/2] Fix cursor pagination crash on empty page --- stubs/resources/views/flux/pagination.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stubs/resources/views/flux/pagination.blade.php b/stubs/resources/views/flux/pagination.blade.php index b3ae1211..627733ab 100644 --- a/stubs/resources/views/flux/pagination.blade.php +++ b/stubs/resources/views/flux/pagination.blade.php @@ -35,7 +35,8 @@ @else @if(method_exists($paginator,'getCursorName')) - @@ -49,7 +50,8 @@ @if ($paginator->hasMorePages()) @if(method_exists($paginator,'getCursorName')) - From 23d0ac0d11cf72e68c7f4ea1eb13acb25ddc1edb Mon Sep 17 00:00:00 2001 From: Josh Hanley Date: Tue, 23 Jun 2026 09:32:11 +1000 Subject: [PATCH 2/2] Document cursor pagination fallback --- stubs/resources/views/flux/pagination.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stubs/resources/views/flux/pagination.blade.php b/stubs/resources/views/flux/pagination.blade.php index 627733ab..1e05b901 100644 --- a/stubs/resources/views/flux/pagination.blade.php +++ b/stubs/resources/views/flux/pagination.blade.php @@ -35,6 +35,7 @@ @else @if(method_exists($paginator,'getCursorName')) + {{-- On an empty page the previous cursor is null, so fall back to the current cursor (reloads the same page, mirroring Laravel's null page URL) --}} @php($previousCursor = $paginator->previousCursor() ?? $paginator->cursor())