查询最近执行的sql

        \DB::enableQueryLog();
        \DB::table('fa_wx_article')
            ->select('id','c_id','title','visit','add_time')
            ->get();
        return \DB::getQueryLog();
[
    {
        "query": "select `id`, `c_id`, `title`, `visit`, `add_time` from `fa_wx_article`",
        "bindings": [],
        "time": 0.54
    }
]

 

posted @ 2020-12-05 17:05  CanyingV  阅读(101)  评论(0)    收藏  举报