|
@@ -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);
|
|
|
}
|
|
|
|
|
|
/**
|