Commit c7b51e25 by Alexander Kochetov Committed by Qiang Xue

\yii\behaviors\SluggableBehavior updated

parent 4c20b57b
......@@ -31,6 +31,21 @@ use yii\helpers\Inflector;
* }
* ```
*
* By default, SluggableBehavior will fill the `slug` attribute with a value that can be used a slug in a URL
* when the associated AR object is being validated. If your attribute name is different, you may configure
* the [[slugAttribute]] property like the following:
*
* ```php
* public function behaviors()
* {
* return [
* [
* 'class' => SluggableBehavior::className(),
* 'slugAttribute' => 'alias',
* ],
* ];
* }
* ```
* @author Alexander Kochetov <creocoder@gmail.com>
* @since 2.0
*/
......
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