diff --git a/framework/behaviors/SluggableBehavior.php b/framework/behaviors/SluggableBehavior.php index afd6785..6af0f33 100644 --- a/framework/behaviors/SluggableBehavior.php +++ b/framework/behaviors/SluggableBehavior.php @@ -12,7 +12,23 @@ use yii\db\BaseActiveRecord; use yii\helpers\Inflector; /** - * SluggableBehavior + * SluggableBehavior automatically fills the specified attribute with the transliteration result of other attribute. + * + * To use SluggableBehavior, simply insert the following code to your ActiveRecord class: + * + * ```php + * use yii\behaviors\SluggableBehavior; + * + * public function behaviors() + * { + * return [ + * [ + * 'class' => 'SluggableBehavior::className(), + * 'attribute' => 'title', + * ], + * ]; + * } + * ``` * * @author Alexander Kochetov * @since 2.0