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

Commit 1cf05d3

Browse files
committed
Merge pull request #22 from kutagh/develop
RelayConnectionType injectCursor compatibility with Laravel 5.2
2 parents 2f148dd + 2653b66 commit 1cf05d3

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)