Skip to content

Commit

Permalink
Merge pull request #7 from Remo/fix-collection-iteration
Browse files Browse the repository at this point in the history
fix laravel collection iteration
  • Loading branch information
nilportugues committed Sep 9, 2015
2 parents ed900c9 + 3d35ce7 commit e28136a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function serializeObject($value)
{
if ($value instanceof \Illuminate\Database\Eloquent\Collection) {
$items = [];
foreach ($value->all() as &$v) {
foreach ($value as &$v) {
$items[] = $this->serializeObject($v);
}
return [self::MAP_TYPE => 'array', self::SCALAR_VALUE => $items];
Expand Down

0 comments on commit e28136a

Please sign in to comment.