mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正路由绑定到命名空间后 类的自动定位
This commit is contained in:
@@ -1064,12 +1064,12 @@ class Route
|
||||
{
|
||||
$url = str_replace($depr, '|', $url);
|
||||
$array = explode('|', $url, 3);
|
||||
$class = Loader::parseName(!empty($array[0]) ? $array[0] : Config::get('default_controller'), 1);
|
||||
$class = !empty($array[0]) ? $array[0] : Config::get('default_controller');
|
||||
$method = !empty($array[1]) ? $array[1] : Config::get('default_action');
|
||||
if (!empty($array[2])) {
|
||||
self::parseUrlParams($array[2]);
|
||||
}
|
||||
return ['type' => 'method', 'method' => [$namespace . '\\' . $class, $method]];
|
||||
return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method]];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user