Skip to content

Commit

Permalink
Corrected the var name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ipalaus committed Jan 24, 2014
1 parent 5b6bc1a commit 407af48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ use Acme\Transformer\BookTransformer;
use League\Fractal\Cursor\Cursor;
use League\Fractal\Resource\Collection;

$users = new Book;
$books = new Book;

if ($current = Input::get('cursor', false)) {
$users = $users->where('id', '>', $current);
$books = $books->where('id', '>', $current);
}

$users = $users->take(5)->get();
$books = $books->take(5)->get();

$cursor = new Cursor($current, $users->last()->id, $users->count());
$cursor = new Cursor($current, $books->last()->id, $books->count());

$resource = new Collection($users, new BookTransformer);
$resource = new Collection($books, new BookTransformer);
$resource->setCursor($cursor);
```

Expand Down

0 comments on commit 407af48

Please sign in to comment.