Laravel打印执行的SQL语句

        DB::connection()->enableQueryLog();#开启执行日志
        $result = DB::table('advert')->whereJsonContains('tag',"1")->get();
        dd(DB::getQueryLog());

原文地址:https://www.cnblogs.com/52lnamp/p/12469729.html