mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Route类
This commit is contained in:
@@ -296,12 +296,13 @@ class Route
|
|||||||
if (!empty($name)) {
|
if (!empty($name)) {
|
||||||
// 分组
|
// 分组
|
||||||
if ($routes instanceof \Closure) {
|
if ($routes instanceof \Closure) {
|
||||||
$curentGroup = self::$group;
|
$curentGroup = self::$group;
|
||||||
|
$currentOption = self::$option;
|
||||||
self::setGroup($name);
|
self::setGroup($name);
|
||||||
self::setOption($option);
|
self::setOption($option);
|
||||||
call_user_func_array($routes, []);
|
call_user_func_array($routes, []);
|
||||||
self::$group = $curentGroup;
|
self::$group = $curentGroup;
|
||||||
self::setOption([]);
|
self::setOption($currentOption);
|
||||||
if ($curentGroup) {
|
if ($curentGroup) {
|
||||||
$name = $curentGroup . '/' . $name;
|
$name = $curentGroup . '/' . $name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user