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