审查视图

application/route.php 1.0 KB
Karson authored
1 2 3 4 5 6 7 8 9 10 11 12
<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
13
//如果有定义绑定后台模块则禁用路由规则 
Karson authored
14
if (\think\Route::getBind('module') == 'admin'){
15
    return [];
Karson authored
16
}
17
Karson authored
18 19
return [
    //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
Karson authored
20
    '__alias__'   => [
Karson authored
21
    ],
Karson authored
22 23
    //变量规则
    '__pattern__' => [
Karson authored
24 25 26 27 28 29 30
    ],
//        域名绑定到模块
//        '__domain__'  => [
//            'admin' => 'admin',
//            'api'   => 'api',
//        ],
];