PHP code example of valiant / yii2-misc
1. Go to this page and download the library: Download valiant/yii2-misc 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/ */
valiant / yii2-misc example snippets
public function behaviors()
{
return [
...
'slug' => [
'class' => valiant\yii2\behaviors\SluggableBehavior::className(),
'from_attribute' => 'name_attribute',
'to_attribute' => 'slug_attribute',
'transliteration' => true,
'unique' => true,
],
];
}
php composer.phar