jidniilman / yii-slug-input
Generate auto slug text from any input using model input or just Html id attribute. Forked from wardany/yii-slug-input
Installs: 5
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Type:yii2-extension
Requires
- jidniilman/yii-slug-input: dev-master
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2022-01-14 04:43:20 UTC
README
Generate auto slug text from any input using model input or just Html id attribute
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist wardany/yii-slug-input:dev-master
or add
"wardany/yii-slug-input": "dev-master"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= $form->field($model, 'slug')->widget(Slugify::className(),['source_attribute'=>'title', 'separator'=>'_', 'disable'=> true]) ?>```