oddchange_at wip
This commit is contained in:
1 parent
4480ba7fee
commit
562c65f331
47 files changed
+295
-213
No files matched your search
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Console\Commands\Grapper\TxOdds\Odds;
|
||||
|
||||
use App\Console\Commands\Nuh;
|
||||
use App\Utilities\Margin;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
@@ -16,10 +15,13 @@ class _2WayS1
|
||||
}
|
||||
$odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1);
|
||||
$odds['updated_at'] = now();
|
||||
DB::table('odds_2ways_s1')->upsert(
|
||||
$odds,
|
||||
|
||||
DB::table('odds_2ways_s1')->updateOrInsert([
|
||||
'event_id' => Nuh::$id,
|
||||
'bookmaker_id' => Nuh::$bookmaker_id,
|
||||
], $odds);
|
||||
['event_id', 'bookmaker_id'],
|
||||
|
||||
['h2w', 'a2w', 'margin', 'flags', 'updated_at']
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user