新增左侧菜单标签方法: 修改文件 config/usermenu.php
return array( ..... ..... ....., array( 'label' => '测试', 'items' => array( array( 'label' => '测试-index', 'action'=>'topc_ctl_test@index' // 在路由文件必须添加此方法路由信息,否则报错 ), array('label' => '测试-add','action'=>'topc_ctl_test@add'), ), ), );bootstrap/routes.php
..... ..... ...... /*测试*/ route::group(array(), function() { route::get('member-test-index.html', [ 'as' => 'what', 'uses' => 'topc_ctl_test@index' ]); route::get('member-test-add.html', [ 'as' => 'what', 'uses' => 'topc_ctl_test@add' ]); });效果图
调用页面方式
$this->action_view //此参数的作用是html页面文件名 最终输出页面情调用 $this->output();custom/topc/controller/test.php
class topc_ctl_test extends topc_ctl_member { public function index() { $pagedata = array(); $this->action_view = "test/index.html"; // 使用$this->output()函数必须继承topc_ctl_member return $this->output($pagedata); } public function add() { } }html页面 custom/topc/view/member/test/index.html
Index Page效果图
