Laravel DB listen 回调追踪产生 sql 语句的代码 Posted on 2018-12-24 Edited on 2020-12-08 1234\DB::listen(function (QueryExecuted $sql) { \Log::info($sql->sql); \Log::info((new \Exception())->getTraceAsString());});