Browse Source

optimization install

Tokumeikoi 5 năm trước cách đây
mục cha
commit
e57a70970f
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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');