PHP code example of pesto / yii2-path-behavior

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

    

pesto / yii2-path-behavior example snippets


  public function behaviors()
  {
      return [
          ...
          [
              'class' => PathBehavior::className(),
              'fieldName' => 'path',          //Поле для генерации пути
              'fromFieldName' => 'title'      //Поле, за основу которого берется строка
          ]
          ...
      ];
  }

$ php composer.phar