Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复当设置app_namespace配置项时应用命名空间出错的问题 #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MultiApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected function setApp(string $appName): void

$this->app->setAppPath($appPath);
// 设置应用命名空间
$this->app->setNamespace($this->app->config->get('app.app_namespace') ?: 'app\\' . $appName);
$this->app->setNamespace(($this->app->config->get('app.app_namespace') ?: 'app') . '\\' . $appName);

if (is_dir($appPath)) {
$this->app->setRuntimePath($this->app->getRuntimePath() . $appName . DIRECTORY_SEPARATOR);
Expand Down