yii2x / yii2-common
YII2 Common
dev-master
2017-05-14 17:52 UTC
Requires
- bower-asset/ace-builds: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-04-27 06:30:00 UTC
README
YII2 Common
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yii2x/yii2-common "*"
or add
"yii2x/yii2-common": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
Model Configuration:
public function behaviors() { return [ [ 'class' => \yii2x\common\behaviors\IpAddressBlameableBehavior::className(), 'createdIpAttribute' => 'created_ip', 'updatedIpAttribute' => 'updated_ip', ], [ 'class' => \yii2x\common\behaviors\JsonFieldBehavior::className(), 'attributes' => ['params'] ] ]; }