laravel sql语句输出

Route::get('/test-sql', function() {

    DB::enableQueryLog();

    $user = App\User::all();

    return response()->json(DB::getQueryLog());
});
posted @ 2017-01-12 14:51  小小小尘埃  阅读(2256)  评论(0编辑  收藏  举报