diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index 2ad1c72b..0f7b6a91 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -218,9 +218,11 @@ abstract class Model { { $model = new static(array(), true); - if (static::$timestamps) $attributes['updated_at'] = new \DateTime; + $model->fill($attributes); - return $model->query()->where($model->key(), '=', $id)->update($attributes); + if (static::$timestamps) $model->timestamp(); + + return $model->query()->where($model->key(), '=', $id)->update($model->attributes); } /**