PHP code example of dragonbuf / nui
1. Go to this page and download the library: Download dragonbuf/nui 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/ */
dragonbuf / nui example snippets
return [
//....
'components' => [
'view' => [
'renderers' => [
'tpl' => [
'class' => 'nuiYii\Nui',
//'cachePath' => '@runtime/Smarty/cache',
'options' => [
"left_delimiter" => "%{",
'caching' => false,
'compile_check' => true,
],
'menu' => [
[
'path' => '/a',
'icon' => '',
'name' => 'a',
'child' => [
[
'path' => '/b',
'icon' => '',
'name' => 'b',
],
[
'path' => '/c',
'icon' => '',
'name' => 'c',
],
[
'path' => '/d',
'icon' => '',
'name' => 'd',
]
]
],
[
'path' => '/e',
'icon' => '',
'name' => 'e',
'child' => [
[
'path' => '/f',
'icon' => '',
'name' => 'f',
],
]
],
[
'path' => '/signer',
'icon' => '',
'name' => '个人中心',
'child' => [
]
]
],
'nuiDefaultName' => 'nui',
'userInfo' => '/user-info',//个人中心
'setting' => '/setting',//设置
'logout' => '/site/logout'//退出
],
],
],
];