src/Leevel/Kernel/KernelConsole.php
protected function getCommandsWithNamespace(array $namespaces): array
    {
        $data = [];

        foreach ($namespaces as $item) {
            $data[$item] = $this->app->namespacePath($item.'\\index');
        }

        return (new Load())->addNamespace($data)->loadData();
    }
protected function getCommandsWithNamespace(array $namespaces): array
    {
        $data = [];

        foreach ($namespaces as $item) {
            $data[$item] = $this->app->namespacePath($item.'\\index');
        }

        return (new Load())->addNamespace($data)->loadData();
    }
整理命令.

@param array $namespaces

@return array