Yii2 timestamp behavior


/ Published in: PHP
Save to your folder(s)

In the model


Copy this code and paste it in your HTML
  1. use yii\behaviors\TimestampBehavior;
  2.  
  3. public function behaviors()
  4. {
  5. return [
  6. TimestampBehavior::className(),
  7. ];
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.