Skip to content

Commit

Permalink
Update JsonSerializer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed Sep 9, 2015
1 parent c941575 commit a9b0f5f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 a9b0f5f

Please sign in to comment.