Route::get('/test-sql', function() { DB::enableQueryLog(); $user = App\User::all(); return response()->json(DB::getQueryLog()); });