How can I check if laravel is connected to the database? I\'ve searched around and I can\'t find anything that would tell me how this is done.
You can Use the following code :
try{ DB::connection()->getDatabaseName(); }catch(Exception $e){ echo $e->getMessage(); }