mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
优化Route类的domain方法
This commit is contained in:
@@ -101,8 +101,7 @@ class Route
|
||||
foreach ($domain as $key => $item) {
|
||||
self::domain($key, $item, $option, $pattern);
|
||||
}
|
||||
} else {
|
||||
if ($rule instanceof \Closure) {
|
||||
} elseif ($rule instanceof \Closure) {
|
||||
// 执行闭包
|
||||
self::setDomain($domain);
|
||||
call_user_func_array($rule, []);
|
||||
@@ -117,7 +116,7 @@ class Route
|
||||
} else {
|
||||
self::$rules['domain'][$domain]['[bind]'] = [$rule, $option, $pattern];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static function setDomain($domain)
|
||||
|
||||
Reference in New Issue
Block a user