mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 08:02:48 +08:00
优化代码
This commit is contained in:
@@ -355,6 +355,7 @@ class Route
|
||||
self::$rules['*'][$name]['pattern'] = $pattern;
|
||||
}
|
||||
} else {
|
||||
$item = [];
|
||||
foreach ($routes as $key => $val) {
|
||||
if (is_numeric($key)) {
|
||||
$key = array_shift($val);
|
||||
@@ -380,8 +381,7 @@ class Route
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($routes instanceof \Closure) {
|
||||
} elseif ($routes instanceof \Closure) {
|
||||
// 闭包注册
|
||||
$currentOption = self::getGroup('option');
|
||||
$currentPattern = self::getGroup('pattern');
|
||||
@@ -393,7 +393,6 @@ class Route
|
||||
self::rule($routes, '', '*', $option, $pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册路由
|
||||
|
||||
Reference in New Issue
Block a user