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

Commit

Permalink
Merge pull request #22 from kutagh/develop
Browse files Browse the repository at this point in the history
RelayConnectionType injectCursor compatibility with Laravel 5.2
  • Loading branch information
chrissm79 committed Jun 3, 2016
2 parents 2f148dd + 2653b66 commit 1cf05d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/Definition/RelayConnectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function injectCursor($collection)
if ($collection instanceof LengthAwarePaginator) {
$page = $collection->currentPage();

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

0 comments on commit 1cf05d3

Please sign in to comment.