PHP code example of xindong888 / tree-nav
1. Go to this page and download the library: Download xindong888/tree-nav 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/ */
xindong888 / tree-nav example snippets
use treeNav\NavTreeX;
use treeNav\Tree;
//....................
NavBar::begin(['brandLabel' => '我的程序']);
echo NavTreeX::widget([
'options' => ['class' => 'navbar-nav nav'],
'items' => Tree::genTreeAll(Tree::data(\app\models\Address::className())),
]);
NavBar::end();