yiisoft-custom/yii2-soft-delete

simple soft delete,bases on Yii2 ActiveRecord

v1.1 2020-11-10 03:02 UTC

This package is auto-updated.

Last update: 2024-11-10 12:16:57 UTC


README

This is a soft delete trait for yii2

Require yiisoft/yii2

Installation

composer require simple/soft-delete

Notice

make sure the table that needs soft-delete has the column marks whether the row was deleted, generally named like deleted_at,is_deleted

Default setting

    column name:is_delete
    sorft delete value:1
    un-sorft-deleted value:0

Usage

<?php
use SoftDelete\SoftDelete;
class tableModel extends Model{
    use SoftDelete;
    
}

?>