Skip to content

Commit

Permalink
fix: 无法获取到请求传入的 database 数据库配置问题;见 评论说明。
Browse files Browse the repository at this point in the history
Cannot overwrite default database config 

laravel/framework#44499
  • Loading branch information
mouyong authored Oct 9, 2022
1 parent abc9680 commit 64716a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Home/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function doInstall(Request $request)
];
$dbConfig['redis']['default'] = array_merge($dbConfig['redis']['default'], $redisDB);
config(['database' => $dbConfig]);
(new DatabaseServiceProvider(app()))->register();
DB::purge();
// db测试
DB::connection()->select('select 1 limit 1');
// redis测试
Expand Down

0 comments on commit 64716a0

Please sign in to comment.