laravel print sql

\DB::connection()->enableQueryLog(); //开启执行日志,加在需要打印的SQL语句之前
dd(\DB::getQueryLog()); //获取查询语句、参数和执行时间

おすすめ

転載: blog.csdn.net/qq_38324424/article/details/123113236