yii2-extension yii2-softdelete-trait
This extension allow you to soft delete your ActiveRecord entities
machour/yii2-softdelete-trait
This extension allow you to soft delete your ActiveRecord entities
- Friday, November 20, 2015
- by machour
- Repository
- 1 Watchers
- 0 Stars
- 9,998 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 2 Versions
- 12 % Grown
SoftDelete trait for Yii2
This trait allow you to store any attribute change happening to an ActiveRecord, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require machour/yii2-softdelete-trait "*"
or add, (*4)
"machour/yii2-softdelete-trait": "*"
to the require section of your composer.json
file., (*5)
Configuration
You need to configure your model as follows:, (*6)
class Article extends ActiveRecord
{
use \machour\yii2\behaviors\SoftDeleteTrait;
static public function getDeletedAtAttribute()
{
return self::tableName() . '.deleted_at';
}
}
dev-master
9999999-dev
This extension allow you to soft delete your ActiveRecord entities
Sources
Download
MIT
The Requires
extension
trait
yii
behavior
softdelete
1.0.0
1.0.0.0
This extension allow you to soft delete your ActiveRecord entities
Sources
Download
MIT
The Requires
extension
trait
yii
behavior
softdelete