mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正Route类的group方法 混合使用闭包和数组后的bug 改进单元测试
This commit is contained in:
@@ -334,11 +334,12 @@ class Route
|
||||
}
|
||||
if (!empty($name)) {
|
||||
// 分组
|
||||
$currentGroup = self::getGroup('name');
|
||||
if ($currentGroup) {
|
||||
$name = $currentGroup . '/' . ltrim($name, '/');
|
||||
}
|
||||
if ($routes instanceof \Closure) {
|
||||
$currentGroup = self::getGroup('name');
|
||||
if ($currentGroup) {
|
||||
$name = $currentGroup . '/' . ltrim($name, '/');
|
||||
}
|
||||
|
||||
$currentOption = self::getGroup('option');
|
||||
$currentPattern = self::getGroup('pattern');
|
||||
self::setGroup($name, $option, $pattern);
|
||||
|
||||
Reference in New Issue
Block a user