vyants/yii2-softdelete

Behavior for soft delete pattern

Installs: 4 388

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 4

Forks: 1

Open Issues: 1

Type:yii2-behavior

dev-master 2015-11-06 12:05 UTC

This package is not auto-updated.

Last update: 2024-04-23 01:09:04 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,
         ],
     ];
}