From fad2c43a01bcd72aab2f39c191996415b9edde38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Thu, 23 Sep 2021 12:33:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=91=BD=E4=BB=A4=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Console/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Console/Kernel.php b/src/Console/Kernel.php index 5dc9904..8c55ae2 100644 --- a/src/Console/Kernel.php +++ b/src/Console/Kernel.php @@ -198,7 +198,7 @@ EOF; } $commands = Finder::create()->in($paths)->files(); foreach ($commands as $command) { - $command = '\App' . str_replace(['/', '.php'], ['\\', ''], Str::after($command->getPathname(), realpath(app_path()) . DIRECTORY_SEPARATOR)); + $command = $this->app->getNamespace() . str_replace(['/', '.php'], ['\\', ''], Str::after($command->getPathname(), realpath(app_path()) . DIRECTORY_SEPARATOR)); $this->doCommand($console, $command); } $pluginList = Utils::getPluginList(); @@ -207,7 +207,7 @@ EOF; if (empty($consolePath)) continue; $commands = Finder::create()->in($consolePath)->files(); foreach ($commands as $command) { - $command = '\Plugin' . str_replace(['/', '.php'], ['\\', ''], Str::after($command->getPathname(), base_path('plugin'))); + $command = 'Plugin\\' . str_replace(['/', '.php'], ['\\', ''], Str::after($command->getPathname(), base_path('plugin'))); $this->doCommand($console, $command); } } -- Gitee