fix:模块路由初始化错误
This commit is contained in:
parent
1d40dd9fe2
commit
558ad1271b
@ -81,6 +81,13 @@ class Module
|
|||||||
*/
|
*/
|
||||||
protected function createRoute(): void
|
protected function createRoute(): void
|
||||||
{
|
{
|
||||||
File::copy(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'route.stub', CatchAdmin::getModuleRoutePath($this->module));
|
$content = Str::of(
|
||||||
|
File::get(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'route.stub')
|
||||||
|
)->replace(['{module}'], [lcfirst($this->module)]);
|
||||||
|
|
||||||
|
File::put(
|
||||||
|
CatchAdmin::getModuleRoutePath($this->module),
|
||||||
|
$content
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user