Skip to content

Commit 2c4746a

Browse files
authored
Fix error when using orderByRaw() in query before using cursorPaginate() (#51023)
1 parent 1ee54e9 commit 2c4746a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Illuminate/Pagination/AbstractCursorPaginator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ public function getCursorForItem($item, $isNext = true)
205205
public function getParametersForItem($item)
206206
{
207207
return collect($this->parameters)
208+
->filter()
208209
->flip()
209210
->map(function ($_, $parameterName) use ($item) {
210211
if ($item instanceof JsonResource) {

0 commit comments

Comments
 (0)