This commit is contained in:
salam committed 2026-02-16 10:15:07 +01:00
1 parent 65dc70e681
commit 237a58fe02
12 files changed
+59 -30

No files matched your search

+28 -17
View File
@@ -11,6 +11,7 @@ use App\Models\OddsGgng;
use App\Models\OddsTotal;
use App\Utilities\Margin;
use App\Utilities\Notice;
use Illuminate\Support\Facades\DB;
class Betica
{
@@ -141,10 +142,13 @@ class Betica
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['starttime'] = (string) $row['start_time'];
Odds3way::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
DB::transaction(function () use ($base, $event) {
Odds3way::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
}, 5);
break;
case 10:
@@ -161,10 +165,13 @@ class Betica
}
$odds['margin'] = (float) Margin::calculate($odds, 1);
OddsDc::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
DB::transaction(function () use ($base, $event) {
OddsDc::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
}, 5);
break;
case 18:
@@ -180,10 +187,13 @@ class Betica
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['total'] = 2.5;
OddsTotal::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
DB::transaction(function () use ($base, $event) {
OddsTotal::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
}, 5);
break;
case 29:
@@ -198,11 +208,12 @@ class Betica
}
$odds['margin'] = (float) Margin::calculate($odds, 1);
OddsGgng::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
break;
DB::transaction(function () use ($base, $event) {
OddsGgng::updateOrCreate([
'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds);
}, 5);
default:
dd($bettypes);