This commit is contained in:
salam committed 2026-01-26 18:26:02 +01:00
1 parent 9ca5657827
commit 6f3d608704
47 files changed
+1005 -145

No files matched your search

@@ -72,6 +72,7 @@ class Bet365
EventBookmaker::updateOrCreate([
'event_id' => $event->id,
'sport_id' => $event->sport_id,
'bookmaker_id' => $bookmaker_id,
], ['starttime' => $event->starttime, 'in_feed' => 1, 'bmoid' => $event->bet365_id]);
@@ -52,22 +52,30 @@ class FindFixture
case 3:
// MAGLOO KENIA
$res = EventBookmaker::where('bookmaker_id', 10)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
if ($res) {
$match = Event::where('id', $res->event_id)->first();
}
break;
case 4:
// MAGLOO NIGERIA
$res = EventBookmaker::where('bookmaker_id', 16)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
if ($res) {
$match = Event::where('id', $res->event_id)->first();
}
break;
case 5:
// LOGIFUTUR NIGERA
$res = EventBookmaker::where('bookmaker_id', 35)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
if ($res) {
$match = Event::where('id', $res->event_id)->first();
}
break;
case 6:
// LOGIFUTUR COLOMBIA
$res = EventBookmaker::where('bookmaker_id', 36)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
if ($res) {
$match = Event::where('id', $res->event_id)->first();
}
break;
}
}
@@ -59,6 +59,7 @@ class Logifuture
EventBookmaker::updateOrCreate([
'event_id' => $event['id'],
'sport_id' => $sport_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['in_feed' => 1, 'bmoid' => $event['event_id'], 'startime' => $event['starttime']]);
@@ -106,8 +106,9 @@ class Fixtures
EventBookmaker::updateOrCreate([
'event_id' => $event['id'],
'sport_id' => $sport_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['in_feed' => 1, 'bmoid' => $event['event_id']]);
], ['in_feed' => 1, 'bmoid' => $event['event_id'], 'starttime' => $event['starttime']]);
}
}
}
+1 -2
View File
@@ -57,8 +57,6 @@ class Odds
$betradar_id = (int) preg_replace('/\D/', '', $match['p']);
$bmoid = preg_replace('/\D/', '', $match['i']);
$starttime = Carbon::parse($match['dt'])->toDateTimeString();
$event_id = Event::where('betradar_id', $betradar_id)->value('id');
@@ -77,6 +75,7 @@ class Odds
EventBookmaker::updateOrCreate([
'event_id' => $event_id,
'sport_id' => $sport_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['starttime' => $starttime, 'in_feed' => 1, 'bmoid' => $base['bmoid']]);
@@ -8,10 +8,19 @@ class FilterTotals
{
$_totals = [];
foreach ($_array as $total => $value) {
if (fmod(abs($total), 1) == 0.5) {
if ($value[12] > 1 and $value[13] > 1) {
$_totals[$total]['over'] = number_format($value[12], 2);
$_totals[$total]['under'] = number_format($value[13], 2);
if ($sport_id == 1) {
if ($total == 2.5) {
if ($value[12] > 1 and $value[13] > 1) {
$_totals[$total]['over'] = number_format($value[12], 2);
$_totals[$total]['under'] = number_format($value[13], 2);
}
}
} else {
if (fmod(abs($total), 1) == 0.5) {
if ($value[12] > 1 and $value[13] > 1) {
$_totals[$total]['over'] = number_format($value[12], 2);
$_totals[$total]['under'] = number_format($value[13], 2);
}
}
}
}
@@ -14,6 +14,7 @@ class MaglooStore1x2
$odds['d3w'] = number_format($value['static'][2], 2) ?? 1;
$odds['a3w'] = number_format($value['static'][3], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
$res = Odds3way::where('event_id', $base['event_id'])->where('bookmaker_id', $base['bookmaker_id'])->first();
@@ -23,6 +24,7 @@ class MaglooStore1x2
$res->h3w = $odds['h3w'];
$res->a3w = $odds['d3w'];
$res->d3w = $odds['a3w'];
$res->flags = 1;
if ($res->isDirty()) {
$res->oddchange_at = now();
}
@@ -14,6 +14,7 @@ class MaglooStoreDc
$odds['dc12'] = number_format($value['static'][10], 2) ?? 1;
$odds['dcx2'] = number_format($value['static'][11], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
$res = OddsDc::where('event_id', $base['event_id'])->where('bookmaker_id', $base['bookmaker_id'])->first();
@@ -24,6 +25,7 @@ class MaglooStoreDc
$res->dc1x = $odds['dc1x'];
$res->dc12 = $odds['dc12'];
$res->dcx2 = $odds['dcx2'];
$res->flags = 1;
if ($res->isDirty()) {
$res->oddchange_at = now();
}
@@ -13,6 +13,7 @@ class MaglooStoreGgng
$odds['gg'] = number_format($value['static'][74], 2) ?? 1;
$odds['ng'] = number_format($value['static'][76], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
$res = OddsGgng::where('event_id', $base['event_id'])->where('bookmaker_id', $base['bookmaker_id'])->first();
@@ -22,6 +23,7 @@ class MaglooStoreGgng
} else {
$res->gg = $odds['gg'];
$res->ng = $odds['ng'];
$res->flags = 1;
if ($res->isDirty()) {
$res->oddchange_at = now();
}
@@ -17,6 +17,7 @@ class MaglooStorePoints
$odds['active_spread'] = $value['active_spread'];
$odds['handicap'] = $handicap;
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
@@ -28,6 +29,7 @@ class MaglooStorePoints
if (! $res) {
OddsPoint::create($odds);
} else {
$res->flags = 1;
$res->home = number_format($odds['home'], 2);
$res->away = number_format($odds['away'], 2);
$res->handicap = number_format($odds['handicap'], 2);
@@ -17,6 +17,7 @@ class MaglooStorePointsQ1
$odds['active_spread'] = $value['active_spread'];
$odds['handicap'] = $handicap;
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
@@ -28,6 +29,7 @@ class MaglooStorePointsQ1
if (! $res) {
OddsPointQ1::create($odds);
} else {
$res->flags = 1;
$res->home = number_format($odds['home'], 2);
$res->away = number_format($odds['away'], 2);
$res->handicap = number_format($odds['handicap'], 2);
@@ -17,6 +17,7 @@ class MaglooStoreTotals
$odds['active_spread'] = $value['active_spread'];
$odds['total'] = $total;
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
@@ -28,6 +29,7 @@ class MaglooStoreTotals
if (! $res) {
OddsTotal::create($odds);
} else {
$res->flags = 1;
$res->over = number_format($odds['over'], 2);
$res->under = number_format($odds['under'], 2);
$res->total = number_format($odds['total'], 2);
@@ -17,6 +17,7 @@ class MaglooStoreTotalsQ1
$odds['active_spread'] = $value['active_spread'];
$odds['total'] = $total;
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
$odds['flags'] = 1;
$odds = array_merge($odds, $base);
@@ -28,6 +29,7 @@ class MaglooStoreTotalsQ1
if (! $res) {
OddsTotalQ1::create($odds);
} else {
$res->flags = 1;
$res->over = number_format($odds['over'], 2);
$res->under = number_format($odds['under'], 2);
$res->total = number_format($odds['total'], 2);
@@ -14,12 +14,14 @@ class MaglooStoreTq
$odds['atq'] = number_format($value['static'][5], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1);
$odds = array_merge($odds, $base);
$odds['flags'] = 1;
$res = OddsTq::where('event_id', $base['event_id'])->where('bookmaker_id', $base['bookmaker_id'])->first();
if (! $res) {
OddsTq::create($odds);
} else {
$res->flags = 1;
$res->htq = $odds['htq'];
$res->atq = $odds['atq'];
if ($res->isDirty()) {
@@ -319,6 +319,7 @@ class Odds
case 'starting_time':
EventBookmaker::updateOrInsert([
'event_id' => $event_id,
'sport_id' => $sport_id,
'bookmaker_id' => $bookmaker_id,
], ['starttime' => $attributeValue]);
break;
@@ -333,6 +334,7 @@ class Odds
case 'starting_time':
EventBookmaker::updateOrInsert([
'event_id' => $event_id,
'sport_id' => $sport_id,
'bookmaker_id' => $bookmaker_id,
], ['starttime' => $attributeValue]);
break;
@@ -347,6 +349,7 @@ class Odds
case 'starting_time':
EventBookmaker::updateOrInsert([
'event_id' => $event_id,
'sport_id' => $sport_id,
'bookmaker_id' => $bookmaker_id,
], ['starttime' => $attributeValue]);
break;