laravel DB:tabel 求两个关联表中不同字段的和
$result = $users = DB::table('curl_user')
->join('curl_user_detail', 'curl_user.id', '=', 'curl_user_detail.user_id')
->select('curl_user.user_currency', DB::raw('SUM(curl_user.user_redit + curl_user_detail.user_buy_redit)' ))
->groupBy('curl_user.user_currency')
->get();
dd($result);