vyants / yii2-softdelete
Behavior for soft delete pattern
Installs: 4 408
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 1
Open Issues: 1
Type:yii2-behavior
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-19 03:42:38 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist vyants/yii2-softdelete "*"
or add
"vyants/yii2-softdelete": "*"
to the require section of your composer.json
file.
Usage
public function behaviors() {
return [
'softDelete' => ['class' => 'vyants\softdelete\SoftDelete',
'statusAttribute' => 'status',
'timeAttribute' => false,
'deletedValue' => -1,
'activeValue' => 1,
],
];
}