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
2016-10-30 16:52:55
Comments
Leave a Comment

Please login to continue.