how to check database is connected or not with laravel commands code example Example: check which database connect laravel DB::connection();