\DB::connection()->enableQueryLog(); // 在sql之前开启
$orders= $this->order->select("customer_id","budding_num")->where($orderMap)->get()->toArray(); //sql
$sql_log= \DB::getQueryLog(); //打印日志
dd($sql_log);
\DB::connection()->enableQueryLog(); // 在sql之前开启
$orders= $this->order->select("customer_id","budding_num")->where($orderMap)->get()->toArray(); //sql
$sql_log= \DB::getQueryLog(); //打印日志
dd($sql_log);
本文标题:laravel打印sql
本文链接:https://www.haomeiwen.com/subject/vjjzoktx.html
网友评论