Fix bug in Eloquent to_array method.
This commit is contained in:
parent
e8046847c4
commit
f34063c517
|
@ -617,6 +617,8 @@ public function to_array()
|
|||
// to_array method, keying them both by name and ID.
|
||||
elseif (is_array($models))
|
||||
{
|
||||
$attributes[$name] = array();
|
||||
|
||||
foreach ($models as $id => $model)
|
||||
{
|
||||
$attributes[$name][$id] = $model->to_array();
|
||||
|
|
Loading…
Reference in New Issue