Commit a9d27ba7 by Taylor Otwell

Merge pull request #902 from JesseObrien/feature/eloquent-update-timestamp

Feature/eloquent update timestamp
parents dcf1966c 1be274ca
......@@ -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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment