Skip to content

Commit 720d9de

Browse files
committed
Fix bug in eloquent model hydration.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
1 parent 2c12be3 commit 720d9de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/database/eloquent/query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function hydrate($model, $results, $include = true)
119119
// we were to pass them in using the constructor or fill methods.
120120
foreach ($result as $key => $value)
121121
{
122-
$new->$key = $value;
122+
$new->set_attribute($key, $value);
123123
}
124124

125125
$new->original = $new->attributes;

0 commit comments

Comments
 (0)