Skip to content

Commit

Permalink
fix: error when using orderByRaw in query before using `cursorPagin…
Browse files Browse the repository at this point in the history
…ate()` (#50887)

Error: `array_flip(): Can only flip string and integer values, entry skipped`
  • Loading branch information
ngunyimacharia authored Apr 2, 2024
1 parent 28de931 commit f172dfa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Illuminate/Pagination/AbstractCursorPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f172dfa

Please sign in to comment.