mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 12:47:55 +08:00
Fixed deep directory prefix
This commit is contained in:
parent
4a1c2e243f
commit
b833fd2f97
@ -200,8 +200,9 @@ class DispatcherFactory
|
||||
{
|
||||
if (! $prefix) {
|
||||
$handledNamespace = Str::replaceFirst('Controller', '', Str::after($className, '\\Controller\\'));
|
||||
$handledNamespace = Str::replaceArray('\\', ['/'], $handledNamespace);
|
||||
$handledNamespace = str_replace('\\', '/', $handledNamespace);
|
||||
$prefix = Str::snake($handledNamespace);
|
||||
$prefix = str_replace('/_', '/', $prefix);
|
||||
}
|
||||
if ($prefix[0] !== '/') {
|
||||
$prefix = '/' . $prefix;
|
||||
|
Loading…
Reference in New Issue
Block a user