public function beforeSave($insert) { if ($this->isNewRecord) { $this->create_time = time(); // new \yii\db\Expression('NOW()'); } else { $this->change_time = time(); //new \yii\db\Expression('NOW()'); } $this->content = Utils::cleanHtml($this->content); return parent::beforeSave($insert); }
public function beforeSave($insert) { $this->content = Utils::cleanHtml($this->content); return parent::beforeSave($insert); }