mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Route指令
This commit is contained in:
@@ -36,7 +36,9 @@ class Route extends Command
|
|||||||
protected function buildRouteCache()
|
protected function buildRouteCache()
|
||||||
{
|
{
|
||||||
$config = include CONF_PATH . 'route' . CONF_EXT;
|
$config = include CONF_PATH . 'route' . CONF_EXT;
|
||||||
\think\Route::import($config);
|
if ($config) {
|
||||||
|
\think\Route::import($config);
|
||||||
|
}
|
||||||
$rules = \think\Route::rules(true);
|
$rules = \think\Route::rules(true);
|
||||||
array_walk_recursive($rules, [$this, 'buildClosure']);
|
array_walk_recursive($rules, [$this, 'buildClosure']);
|
||||||
$content = '<?php ' . PHP_EOL . 'return ';
|
$content = '<?php ' . PHP_EOL . 'return ';
|
||||||
|
|||||||
Reference in New Issue
Block a user