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\OddsQualify;
use App\Utilities\Margin;
use App\Utilities\Notice;
use Illuminate\Support\Carbon;
class _Tq
{
@@ -18,25 +17,15 @@ class _Tq
Notice::note('To Qualify '.Nuh::$bookmaker_id, 'b');
}
$update_array = [];
foreach ($offer as $value) {
$update_array['hta'] = (float) $value->o1;
$update_array['atq'] = (float) $value->o3;
$odds['htq'] = (float) $value->o1;
$odds['atq'] = (float) $value->o3;
}
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
$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['htq'], $odds['atq']], 1);
OddsQualify::updateOrCreate([
'event_id' => Nuh::$_event->id,
'event_id' => Nuh::$id,
'bookmaker_id' => Nuh::$bookmaker_id,
], $update_array);
], $odds);
}
}