laravel打印所执行的sql语句

232次阅读
没有评论
use Illuminate\Support\Facades\DB;

DB::connection()->enableQueryLog();# 开启执行日志



info(DB::getQueryLog());   // 获取查询语句、参数和执行时间,并打印到 laravel 日志中 
正文完
有偿技术支持加微信
post-qrcode
 
评论(没有评论)
验证码