dev-master
9999999-devroute for zanphp
MIT
The Requires
by Hui Chen
fastroute zanphp
Wallogit.com
2017 © Pedro Peláez
route for zanphp
~ 在 zanphp 中 使用 FastRoute 路由, (*1)
~ 兼容 zanphp 默认 路由, (*2)
composer require cjeruen/route-for-zanphp:dev-master, (*3)
init/WorkerStart/.config.php, (*4)
或者, (*5)
init/ServerStart/.config.php, (*6)
return [
// other initialize
\Com\JeRuen\Zan\Routing\FastRoute\InitializeRouter::class,
];
resource/config/share/route.php, (*7)
return [
'default_route' => '/index',
'default_controller' => 'index',
'default_action' => 'index',
'default_format' => 'html',
'router_class' => 'Com\JeRuen\Zan\Routing\FastRoute\Router',
'router_path' => 'src/routing.php',
// compatible use zan router if not found. default false
// 是否开启兼容zan路由(未匹配则找zan默认路由匹配)
'router_compatible' => true,
];
<?php use Com\JeRuen\Zan\Routing\FastRoute\R as Route; Route::get('/a', 'index/index/index'); Route::addRoute('POST', '/a', 'index/index/index');
route for zanphp
MIT
fastroute zanphp