yii2-slugify Slugify extension for Yii2

Yii2 Slugify

  1. Installation
  2. Usage

Slugify extension for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist powerkernel/yii2-slugify "*"

or add

"powerkernel/yii2-slugify": "*"

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(\powerkernel\slugify\Slugify::className(),['source'=>'#blog-title']) ?>
    <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
0 0
1 follower
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Tags: slugify, yii2
Developed by: Harry Tang
Created on: Aug 27, 2016
Last updated: 6 years ago

Related Extensions