check database is connect in laravel command code example Example: check which database connect laravel DB::connection();