DB::connection()->enableQueryLog();#开启执行日志 $result = DB::table(‘advert‘)->whereJsonContains(‘tag‘,"1")->get(); dd(DB::getQueryLog());
Laravel打印执行的SQL语句
原文:https://www.cnblogs.com/52lnamp/p/12469729.html