PHP code example of mrmuminov / yii2-combo-tree

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

    

mrmuminov / yii2-combo-tree example snippets


<?= \MrMuminov\ComboTree\ComboTree::widget([
    'source' => [
        [
            'id' => 1,
            'title' => 'choice 1',
        ], 
        [
            'id' => 2,
            'title' => 'choice 2',
        ],
        [
            'id' => 3,
            'title' => 'choice 2 1',
            'parent_id' => 2,
        ], 
        [
            'id' => 4,
            'title' => 'choice 2 2',
            'parent_id' => 2,
        ], 
        [
            'id' => 5,
            'title' => 'choice 2 3',
            'parent_id' => 2,
        ], 
        [
            'id' => 6,
            'title' => 'choice 3',
        ], 
    ],
    'pluginOptions' => [
        'cascadeSelect' => false,
    ],
]); 
bash
php composer.phar