oddchange_at wip
This commit is contained in:
1 parent
4480ba7fee
commit
562c65f331
47 files changed
+295
-213
No files matched your search
@@ -3,7 +3,6 @@
|
||||
namespace App\Console\Commands\Grapper\TxOdds\Odds;
|
||||
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
|
||||
use App\Console\Commands\Nuh;
|
||||
use App\Utilities\Margin;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
@@ -25,12 +24,15 @@ class _Points
|
||||
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
|
||||
$odds['updated_at'] = now();
|
||||
|
||||
ActiveSpread::collect($odds, 'odds_points');
|
||||
DB::table('odds_points')->upsert(
|
||||
$odds,
|
||||
|
||||
DB::table('odds_points')->updateOrInsert([
|
||||
'event_id' => Nuh::$id,
|
||||
'bookmaker_id' => Nuh::$bookmaker_id,
|
||||
'handicap' => $odds['handicap'],
|
||||
], $odds);
|
||||
['event_id', 'bookmaker_id', 'handicap'],
|
||||
|
||||
['home', 'away', 'difference', 'margin', 'flags', 'updated_at']
|
||||
|
||||
);
|
||||
|
||||
ActiveSpread::collect($odds, 'odds_points');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user