Skip to content
This repository was archived by the owner on Mar 29, 2020. It is now read-only.

Commit 2653b66

Browse files
author
Ian Zunderdorp
committed
RelayConnectionType injectCursor compatibility with Laravel 5.2
1 parent aa32636 commit 2653b66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Support/Definition/RelayConnectionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ protected function injectCursor($collection)
133133
if ($collection instanceof LengthAwarePaginator) {
134134
$page = $collection->currentPage();
135135

136-
$collection->each(function ($item, $x) use ($page) {
136+
$collection->values()->each(function ($item, $x) use ($page) {
137137
$cursor = ($x + 1) * $page;
138138
$encodedCursor = $this->encodeGlobalId('arrayconnection', $cursor);
139139
if (is_array($item)) {

0 commit comments

Comments
 (0)