newLine(); try { DB::connection()->getPDO(); $this->info('Currently connected to ' . DB::connection()->getDriverName() . ' db "' . DB::connection()->getDatabaseName() . '"'); return 1; } catch (\Exception $e) { $this->error('Cannot connect to ' . DB::connection()->getDriverName() . ' db "' . DB::connection()->getDatabaseName() . '"'); return 0; } } }