PHP code example of zabachok / yii2-sluggable-behavior
1. Go to this page and download the library: Download zabachok/yii2-sluggable-behavior library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zabachok / yii2-sluggable-behavior example snippets
use zabachok\behaviors\SluggableBehavior;
public function behaviors()
{
return [
[
'class' => SluggableBehavior::className(),
'attribute' => 'title',
// 'slugAttribute' => 'slug',
],
];
}
php composer.phar