jc-it/yii2-blameable-behavior

Blameable behavior for Yii2 that includes deleted by.

v1.0.0 2019-06-10 11:56 UTC

This package is auto-updated.

Last update: 2024-03-10 22:46:14 UTC


README

This extension provides a package that extends the Blameable behavior with a deleted_by field.

$ composer require jc-it/yii2-blameable-behavior

or add

"jc-it/yii2-blameable-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(),
        [
            BlameableBehavior::class => [
                'class' => BlameableBehavior::class
            ],
        ]
    );
}

For more detailed configuration, see Blameable behavior.

Credits

License

The MIT License (MIT). Please see LICENSE for more information.