heggi/yii2-slugwidget

Widget for autogeneration slug

Installs: 45

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

Type:yii2-extension

v0.1.0.1 2017-07-06 15:34 UTC

This package is not auto-updated.

Last update: 2024-04-23 16:20:11 UTC


README

Widget for autogeneration slug

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist heggi/yii2-slugwidget "*"

or add

"heggi/yii2-slugwidget": "*"

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, 'title')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'slug')->widget(\heggi\slugwidget\SlugWidget::className(), ['title' => 'title']) ?>