PHP code example of yii2-bridge / slug-behavior

1. Go to this page and download the library: Download yii2-bridge/slug-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/ */

    

yii2-bridge / slug-behavior example snippets


public function behaviors()
{
    return [
        'slug' => [
            'class' => 'Bridge\Slug\BridgeSlugBehavior',
            'slugAttribute' => 'slug',
            'attribute' => 'title',
            // If intl extension is enabled, see http://userguide.icu-project.org/transforms/general.
            'transliterateOptions' => 'Russian-Latin/BGN; Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;'
        ],
    ];
}