Commit f34063c5 authored by Taylor Otwell's avatar Taylor Otwell

Fix bug in Eloquent to_array method.

parent e8046847
......@@ -617,6 +617,8 @@ abstract class Model {
// 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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment