Add usage in readme

parent be132243
# phpstorm project files
.idea
# netbeans project files
nbproject
# zend studio for eclipse project files
.buildpath
.project
.settings
# windows thumbnail cache
Thumbs.db
# composer vendor dir
/vendor
# composer itself is not needed
composer.phar
composer.lock
# Mac DS_Store Files
.DS_Store
# phpunit itself is not needed
phpunit.phar
# local phpunit config
/phpunit.xml
......@@ -5,3 +5,34 @@ Soft delete behavior for Yii2
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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,
],
];
}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment