comp wip
This commit is contained in:
1 parent
391bd1d1f3
commit
26bf5359bc
14 files changed
+256
-235
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\TxOdds\Odds;
|
||||
|
||||
use App\Console\Commands\NuhBash;
|
||||
use App\Models\OddsQualify;
|
||||
use App\Utilities\Margin;
|
||||
use App\Utilities\Notice;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class _Tq
|
||||
{
|
||||
public static function grap($odds, $offer)
|
||||
{
|
||||
$debug = NuhBash::$options['d'] ?? 0;
|
||||
|
||||
if ($debug) {
|
||||
Notice::note('To Qualify '.$odds['bookmaker_id'], 'b');
|
||||
}
|
||||
|
||||
$update_array = [];
|
||||
foreach ($offer as $value) {
|
||||
$update_array['hta'] = (float) $value->o1;
|
||||
$update_array['atq'] = (float) $value->o3;
|
||||
}
|
||||
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
||||
|
||||
$update_array['bmoid'] = $odds['bmoid'];
|
||||
$update_array['offer_id'] = $odds['offer_id'];
|
||||
$update_array['flag'] = 1;
|
||||
$update_array['nuh_check'] = 0;
|
||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||
|
||||
OddsQualify::updateOrCreate($odds, $update_array);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user