Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function behaviors()
- {
- return [
- 'timestamp' => [
- 'class' => 'yiibehaviorsTimestampBehavior',
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['log_in_time' ],
- ActiveRecord::EVENT_BEFORE_UPDATE => ['log_in_time'],
- ],
- 'value' => new Expression('NOW()'),
- ],
- ];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement