From 720d9de5826cb5a45149715d12b2fa56fe0e7ff4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 28 Mar 2012 11:07:26 -0500 Subject: [PATCH] Fix bug in eloquent model hydration. Signed-off-by: Taylor Otwell --- laravel/database/eloquent/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/eloquent/query.php b/laravel/database/eloquent/query.php index e438f56d..c4367e96 100644 --- a/laravel/database/eloquent/query.php +++ b/laravel/database/eloquent/query.php @@ -119,7 +119,7 @@ public function hydrate($model, $results, $include = true) // we were to pass them in using the constructor or fill methods. foreach ($result as $key => $value) { - $new->$key = $value; + $new->set_attribute($key, $value); } $new->original = $new->attributes;