how can I get mongodb query log in Laravel

Solution:

DB::getQueryLog() will use the default connection, I think your default connection is mysql. so it print the mysql query log.

Try to use your mongodb connection, something like this:

DB::connection('mongodb')->enableQueryLog();
DB::connection('mongodb')->getQueryLog();