初始字段

$fields = [
    'rule'        => '/demo',//伪静态规则
    'address'     => 'demo/index/index',//真实访问路径
    'method'      => 'get',//请求类型
    'option'      => '',//高级路由参数(需json格式)
    'pattern'     => '',//高级变量规则(需json格式)
];

卸载插件时删除路由规则

model('common/Route','loglic')->uninstall('demo');

安装插件时批量插入多个路由规则

model('common/Route','loglic')->install([
    [
        'rule'        => '/demo',
        'address'     => 'test/demo/index',
        'method'      => 'get',
    ],
    [
        'rule'        => '/test',
        'address'     => 'test/index/index',
        'method'      => 'get',
    ],
],'demo');