PHP code example of ipaya / yii2-widget-nav
1. Go to this page and download the library: Download ipaya/yii2-widget-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/ */
ipaya / yii2-widget-nav example snippets
\iPaya\widgets\nav\Nav::setNavItems('main', [
['label'=>'首页','url'=>Yii::$app->homeUrl],
['label'=>'关于','url'=>['/site/about']]
]);
<?= \iPaya\widgets\nav\Nav::widget([
'items'=>'main',
]);
php composer.phar