dev-master
9999999-devyii2 slug behavior
MIT
The Requires
by Evgeny
extension yii2 behavior slug seacjs
yii2 slug behavior
Yii2 slug behavior, (*1)
The preferred way to install this extension is through Composer., (*2)
Either run php composer.phar require seacjs/yii2-slug-behavior "*"
, (*3)
or add "seacjs/yii2-slug-behavior": "*"
to the require section of your composer.json
, (*4)
Attach the behavior in your model:, (*5)
public function behaviors() { return [ 'slug' => [ 'class' => 'seacjs\behaviors\Slug', 'slugAttribute' => 'slug', 'attribute' => 'name', 'translit' => true, ] ]; }
or use another class Sluggable, work with transliteration, (*6)
Sluggable extends SluggableBehavior, (*7)
public function behaviors() { return [ 'slug' => [ 'class' => 'seacjs\behaviors\Sluggable', 'slugAttribute' => 'slug', 'attribute' => 'name', ] ]; }
yii2 slug behavior
MIT
extension yii2 behavior slug seacjs