This commit is contained in:
salam committed 2026-01-08 19:57:49 +01:00
1 parent 4f9125ef12
commit 61418c8cee
47 files changed
+726 -221

No files matched your search

@@ -5,18 +5,11 @@ namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Nuh;
use App\Models\OddsTotal;
use App\Utilities\Margin;
use App\Utilities\Notice;
class _Totals
{
public static function grap($odds, $offer)
{
// $debug = Nuh::$options['d'] ?? 0;
// if ($debug) {
// Notice::note('Totals '.Nuh::$bookmaker_id, 'b');
// }
foreach ($offer as $value) {
$odds['over'] = (float) $value->o1;
$odds['under'] = (float) $value->o2;
@@ -30,10 +23,12 @@ class _Totals
}
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
OddsTotal::updateOrCreate([
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
'total' => $odds['total'],
], $odds);
}
}