From c719b60310259880dd1461f5fcaa4bcf5178b4f2 Mon Sep 17 00:00:00 2001 From: Choraimy Kroonstuiver <3661474+axlon@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:22:58 +0200 Subject: [PATCH] Fix error when using `orderByRaw()` in query before using `cursorPaginate()` --- src/Illuminate/Pagination/AbstractCursorPaginator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Illuminate/Pagination/AbstractCursorPaginator.php b/src/Illuminate/Pagination/AbstractCursorPaginator.php index e6700789c176..fa3070c24521 100644 --- a/src/Illuminate/Pagination/AbstractCursorPaginator.php +++ b/src/Illuminate/Pagination/AbstractCursorPaginator.php @@ -205,6 +205,7 @@ public function getCursorForItem($item, $isNext = true) public function getParametersForItem($item) { return collect($this->parameters) + ->filter() ->flip() ->map(function ($_, $parameterName) use ($item) { if ($item instanceof JsonResource) {