From f172dfac830e00fd32604127b0cb2ecc8a2a0855 Mon Sep 17 00:00:00 2001 From: Kelvin Macharia Ngunyi Date: Tue, 2 Apr 2024 16:11:56 +0300 Subject: [PATCH] fix: error when using `orderByRaw` in query before using `cursorPaginate()` (#50887) Error: `array_flip(): Can only flip string and integer values, entry skipped` --- 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 5a150f132279..27f470382d8e 100644 --- a/src/Illuminate/Pagination/AbstractCursorPaginator.php +++ b/src/Illuminate/Pagination/AbstractCursorPaginator.php @@ -206,6 +206,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) {