为什么laravel 打印sql这么难! 这么难!

        DB::connection()->enableQueryLog();  // 开启QueryLog
        \App\User::find(1);
        dump(DB::getQueryLog());

太难了 这个打印 !! 从来没用过laravel 头一次发现打印sql这么难!!!! 后续遇到别的方法再补充!!!!!

猜你喜欢

转载自blog.csdn.net/weixin_43944691/article/details/103711037