behaviors\TimestampBehavior touch()

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).

doc_Yii
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.