grapper betsapi

This commit is contained in:
salam committed 2025-12-22 08:15:59 +01:00
1 parent 406fd26864
commit a3c9f16550
127 files changed
+158128 -650

No files matched your search

@@ -6,7 +6,6 @@ use App\Console\Commands\Nuh;
use App\Models\Odds3way;
use App\Utilities\Margin;
use App\Utilities\Notice;
use Illuminate\Support\Carbon;
class _3Way
{
@@ -18,33 +17,17 @@ class _3Way
Notice::note('1X2 '.Nuh::$bookmaker_id, 'b');
}
$update_array = [];
foreach ($offer as $value) {
$update_array['h3w'] = (float) $value->o1;
$update_array['d3w'] = (float) $value->o2;
$update_array['a3w'] = (float) $value->o3;
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
$bkm_starttime = (string) $value['starting_time'];
$odds['h3w'] = (float) $value->o1;
$odds['d3w'] = (float) $value->o2;
$odds['a3w'] = (float) $value->o3;
$odds['starting_time'] = (string) $value['starting_time'];
}
Nuh::$_event_bookmaker[] =
[
'bmoid' => $odds['bmoid'],
'starttime' => $bkm_starttime,
];
$update_array['bmoid'] = $odds['bmoid'];
$update_array['sport_id'] = $odds['sport_id'];
$update_array['offer_id'] = $odds['offer_id'];
$update_array['flag'] = 1;
$update_array['provider_id'] = Nuh::$options['provider_id'];
$update_array['nuh_check'] = 0;
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
$update_array['source_updated_at'] = $odds['source_updated_at'];
$odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1);
Odds3way::updateOrCreate([
'event_id' => Nuh::$_event->id,
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
], $update_array);
], $odds);
}
}