touch() public method
Updates a timestamp attribute to the current timestamp.
$model->touch('lastVisit');
| public void touch ( $attribute ) | ||
|---|---|---|
| $attribute | string |
The name of the attribute to update. |
| throws | yii\base\InvalidCallException |
if owner is a new record (since version 2.0.6). |
Please login to continue.