jc-it / yii2-timestamp-behavior
Timestamp behavior for Yii2 that includes deleted at.
Installs: 614
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jc-it/yii2-timestamp-behavior
Requires
- php: >=7.1.0
- yiisoft/yii2: ~2.0.19
This package is not auto-updated.
Last update: 2025-10-04 16:08:12 UTC
README
This extension provides a package that extends the Timestamp behavior with a deleted_at
field.
$ composer require jc-it/yii2-timestamp-behavior
or add
"jc-it/yii2-timestamp-behavior": "^<latest version>"
to the require
section of your composer.json
file.
Configuration
In a model:
/** * @return array */ public function behaviors(): array { return ArrayHelper::merge( parent::behaviors(), [ TimestampBehavior::class => [ 'class' => TimestampBehavior::class ], ] ); }
For more detailed configuration, see Timestamp behavior.
Credits
License
The MIT License (MIT). Please see LICENSE for more information.