valiant/yii2-misc

This package is abandoned and no longer maintained. No replacement package was suggested.

Yii2 misc

0.1 2015-11-06 06:10 UTC

This package is not auto-updated.

Last update: 2020-08-25 22:52:29 UTC


README

Yii2 misc

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist valiant/yii2-misc "*"

or add

"valiant/yii2-misc": "*"

to the require section of your composer.json file.

Usage

SluggableBehavior:

	public function behaviors()
	{
		return [
		    ...
			'slug' => [
				'class' => valiant\yii2\behaviors\SluggableBehavior::className(),
				'from_attribute' => 'name_attribute',
				'to_attribute' => 'slug_attribute',
				'transliteration' => true,
				'unique' => true,
			],
		];
	}