heggi / yii2-slugwidget
自动生成slug的小部件
v0.1.0.1
2017-07-06 15:34 UTC
Requires
- bower-asset/speakingurl: ^13.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-24 18:21:54 UTC
README
自动生成slug的小部件
安装
安装此扩展的首选方式是通过 composer。
可以运行
php composer.phar require --prefer-dist heggi/yii2-slugwidget "*"
或者将以下内容添加到你的 composer.json
文件的 require 部分:
"heggi/yii2-slugwidget": "*"
to the require section of your composer.json
file.
使用方法
扩展安装完成后,只需在你的代码中使用它即可
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'slug')->widget(\heggi\slugwidget\SlugWidget::className(), ['title' => 'title']) ?>