I am trying to check if a database is connected in Laravel.
I\'ve looked around the documentation and can\'t find anything. The closest thing I\'ve found is this, bu
You can also run this:
php artisan migrate:status
It makes a db connection connection to get migrations from migrations table. It'll throw an exception if the connection fails.