public function behaviors()
 {
     return ['timestamp' => ['class' => TimeStampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']], 'value' => new Expression('NOW()')]];
 }
Esempio n. 2
0
 public function behaviors()
 {
     return [TimeStampBehavior::className()];
 }