mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
修正Route类
This commit is contained in:
@@ -323,9 +323,9 @@ class Route
|
|||||||
if (!empty($name)) {
|
if (!empty($name)) {
|
||||||
// 分组
|
// 分组
|
||||||
if ($routes instanceof \Closure) {
|
if ($routes instanceof \Closure) {
|
||||||
$curentGroup = self::getGroup('name');
|
$currentGroup = self::getGroup('name');
|
||||||
if ($curentGroup) {
|
if ($currentGroup) {
|
||||||
$name = $curentGroup . '/' . ltrim($name, '/');
|
$name = $currentGroup . '/' . ltrim($name, '/');
|
||||||
}
|
}
|
||||||
$currentOption = self::getGroup('option');
|
$currentOption = self::getGroup('option');
|
||||||
$currentPattern = self::getGroup('pattern');
|
$currentPattern = self::getGroup('pattern');
|
||||||
@@ -366,7 +366,7 @@ class Route
|
|||||||
} else {
|
} else {
|
||||||
if ($routes instanceof \Closure) {
|
if ($routes instanceof \Closure) {
|
||||||
// 闭包注册
|
// 闭包注册
|
||||||
$curentGroup = self::getGroup('name');
|
$currentGroup = self::getGroup('name');
|
||||||
$currentOption = self::getGroup('option');
|
$currentOption = self::getGroup('option');
|
||||||
$currentPattern = self::getGroup('pattern');
|
$currentPattern = self::getGroup('pattern');
|
||||||
self::setGroup($name, $option, $pattern);
|
self::setGroup($name, $option, $pattern);
|
||||||
|
|||||||
Reference in New Issue
Block a user