1、故意把代码写错,报错时会出现原生sql语句 2、DB::getQueryLog() 3、$query->toSql(); 转载于:https://www.cnblogs.com/aiit/p/7131424.html