Browse Source

Fix bug in eloquent model hydration.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell 12 years ago
parent
commit
720d9de582
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/database/eloquent/query.php

+ 1 - 1
laravel/database/eloquent/query.php

@@ -119,7 +119,7 @@ class Query {
 			// 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;