wolfpack-it/yii2-active-record-soft-delete

Yii2 Active Record - 软删除

v1.2.0 2020-03-22 19:02 UTC

This package is auto-updated.

Last update: 2024-09-23 05:43:40 UTC


README

此扩展为Yii2框架的Active Record提供软删除集成。

安装

安装此扩展的首选方式是通过composer

运行以下命令之一:

$ composer require wolfpack-it/yii2-active-record-soft-delete

或者将以下内容添加到你的composer.json文件的require部分:

"wolfpack-it/yii2-active-record-soft-delete": "^<latest version>"

to the require section of your composer.json file.

配置

在Active Record中

class ActiveRecordClass extends \yii\db\ActiveRecord {
    use \WolfpackIT\softDelete\traits\SoftDelete;
}

待办事项

  • 添加测试

致谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅LICENSE