• 每天进步一点点!

文章分类

推荐网站

常用手册

laravel打印Sql【原创】

<<返回

2019-05-16 14:42:13

\DB::connection()->enableQueryLog();
$result = \DB::select('select * from activity');
$log = \DB::getQueryLog();
dd($log);
\error_log('$log = ' . print_r($log, true) . "\n", 3, "/tmp/error.log");

 

文章评论

  • 暂无评论

发表评论

昵称:

内容:

发表评论