소스 검색

optimization install

Tokumeikoi 5 년 전
부모
커밋
e57a70970f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      app/Console/Commands/V2boardInstall.php

+ 3 - 1
app/Console/Commands/V2boardInstall.php

@@ -58,7 +58,9 @@ class V2boardInstall extends Command
         ]);
         \Artisan::call('config:clear');
         \Artisan::call('config:cache');
-        if (!DB::connection()->getPdo()) {
+        try {
+            DB::connection()->getPdo();
+        } catch (\Exception $e) {
             abort(500, '数据库连接失败');
         }
         $file = \File::get(base_path() . '/database/install.sql');