PHP code example of mztest / yii2-widget-infinite-level
1. Go to this page and download the library: Download mztest/yii2-widget-infinite-level 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/ */
mztest / yii2-widget-infinite-level example snippets
use mztest\infiniteLevel\InfiniteLevel;
<?= $form->field($model, 'parent_id')->widget(InfiniteLevel::className(), [
'items' => [['value' => 'value1', 'label' =>'label1'], ['value' => 'value2', 'label' =>'label2']],
'itemParents' => ['Parents ID here']
])
php composer.phar