grapper wip

This commit is contained in:
salam committed 2026-01-18 14:35:30 +01:00
1 parent 562c65f331
commit 4184acdb8a
60 files changed
+28840 -398

No files matched your search

+127 -45
View File
@@ -5,6 +5,7 @@ namespace App\Console\Commands\Grapper\Betsapi;
use App\Console\Commands\Curl; use App\Console\Commands\Curl;
use App\Console\Commands\Nuh; use App\Console\Commands\Nuh;
use App\Models\Event; use App\Models\Event;
use App\Models\EventBookmaker;
use App\Models\Odds3way; use App\Models\Odds3way;
use App\Models\Odds3wayHt; use App\Models\Odds3wayHt;
use App\Models\OddsDc; use App\Models\OddsDc;
@@ -64,9 +65,16 @@ class Bet365
if (isset($data['results'][0]['main'])) { if (isset($data['results'][0]['main'])) {
EventBookmaker::updateOrCreate([
'event_id' => $event->id,
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['starttime' => $event->starttime, 'in_feed' => 1, 'bmoid' => $event->bet365_id]);
$offer = $data['results'][0]['main']['sp']; $offer = $data['results'][0]['main']['sp'];
$base = []; $base = [];
$base['event_id'] = $event->id;
$base['bookmaker_id'] = $bookmaker_id;
$base['sport_id'] = $event->sport_id; $base['sport_id'] = $event->sport_id;
$base['provider_id'] = Nuh::$options['provider_id']; $base['provider_id'] = Nuh::$options['provider_id'];
$base['bmoid'] = $event->bet365_id; $base['bmoid'] = $event->bet365_id;
@@ -77,15 +85,28 @@ class Bet365
*/ */
if (isset($offer['full_time_result'])) { if (isset($offer['full_time_result'])) {
$odds = []; $odds = [];
$odds['h3w'] = $offer['full_time_result']['odds'][0]['odds'] ?? 1; $odds['h3w'] = number_format($offer['full_time_result']['odds'][0]['odds'], 2) ?? 1;
$odds['d3w'] = $offer['full_time_result']['odds'][1]['odds'] ?? 1; $odds['d3w'] = number_format($offer['full_time_result']['odds'][1]['odds'], 2) ?? 1;
$odds['a3w'] = $offer['full_time_result']['odds'][2]['odds'] ?? 1; $odds['a3w'] = number_format($offer['full_time_result']['odds'][2]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
Odds3way::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event->id,
'bookmaker_id' => $bookmaker_id, $res = Odds3way::where('event_id', $event->id)->where('bookmaker_id', $bookmaker_id)->first();
], $base + $odds);
if (! $res) {
Odds3way::create($odds);
} else {
$res->h3w = $odds['h3w'];
$res->a3w = $odds['d3w'];
$res->d3w = $odds['a3w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
} }
/** /**
@@ -93,15 +114,28 @@ class Bet365
*/ */
if (isset($offer['double_chance'])) { if (isset($offer['double_chance'])) {
$odds = []; $odds = [];
$odds['dc1x'] = $offer['double_chance']['odds'][0]['odds'] ?? 1; $odds['dc1x'] = number_format($offer['double_chance']['odds'][0]['odds'], 2) ?? 1;
$odds['dc12'] = $offer['double_chance']['odds'][1]['odds'] ?? 1; $odds['dc12'] = number_format($offer['double_chance']['odds'][1]['odds'], 2) ?? 1;
$odds['dcx2'] = $offer['double_chance']['odds'][2]['odds'] ?? 1; $odds['dcx2'] = number_format($offer['double_chance']['odds'][2]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
OddsDc::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event->id,
'bookmaker_id' => $bookmaker_id, $res = OddsDc::where('event_id', $event->id)->where('bookmaker_id', $bookmaker_id)->first();
], $base + $odds);
if (! $res) {
OddsDc::create($odds);
} else {
$res->dc1x = $odds['dc1x'];
$res->dc12 = $odds['dc12'];
$res->dcx2 = $odds['dcx2'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
} }
/** /**
@@ -110,19 +144,35 @@ class Bet365
if (isset($offer['goals_over_under'])) { if (isset($offer['goals_over_under'])) {
$odds = []; $odds = [];
$odds['over'] = $offer['goals_over_under']['odds'][0]['odds'] ?? 1; $odds['over'] = number_format($offer['goals_over_under']['odds'][0]['odds'], 2) ?? 1;
$odds['under'] = $offer['goals_over_under']['odds'][1]['odds'] ?? 1; $odds['under'] = number_format($offer['goals_over_under']['odds'][1]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
if ($base['sport_id'] == 1) { if ($base['sport_id'] == 1) {
$odds['active_spread'] = 1; $odds['active_spread'] = 1;
} }
$odds = array_merge($odds, $base);
if ($offer['goals_over_under']['odds'][1]['name'] == '2.5') { if ($offer['goals_over_under']['odds'][1]['name'] == '2.5') {
OddsTotal::updateOrCreate([ $odds['total'] = 2.5;
'event_id' => $event->id, $res = OddsTotal::where('event_id', $event->id)
'bookmaker_id' => $bookmaker_id, ->where('bookmaker_id', $bookmaker_id)
'total' => 2.5, ->where('total', $odds['total'])
], $base + $odds); ->first();
if (! $res) {
OddsTotal::create($odds);
} else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->difference = abs(1 / $odds['over'] - 1 / $odds['under']);
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -131,14 +181,26 @@ class Bet365
*/ */
if (isset($offer['both_teams_to_score'])) { if (isset($offer['both_teams_to_score'])) {
$odds = []; $odds = [];
$odds['gg'] = $offer['both_teams_to_score']['odds'][0]['odds'] ?? 1; $odds['gg'] = number_format($offer['both_teams_to_score']['odds'][0]['odds'], 2) ?? 1;
$odds['ng'] = $offer['both_teams_to_score']['odds'][1]['odds'] ?? 1; $odds['ng'] = number_format($offer['both_teams_to_score']['odds'][1]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
OddsGgng::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event->id,
'bookmaker_id' => $bookmaker_id, $res = OddsGgng::where('event_id', $event->id)->where('bookmaker_id', $bookmaker_id)->first();
], $base + $odds);
if (! $res) {
OddsGgng::create($odds);
} else {
$res->gg = $odds['gg'];
$res->ng = $odds['ng'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
} }
/** /**
@@ -146,35 +208,55 @@ class Bet365
*/ */
if (isset($offer['draw_no_bet'])) { if (isset($offer['draw_no_bet'])) {
$odds = []; $odds = [];
$odds['dnb1'] = $offer['draw_no_bet']['odds'][0]['odds'] ?? 1; $odds['dnb1'] = number_format($offer['draw_no_bet']['odds'][0]['odds'], 2) ?? 1;
$odds['dnb2'] = $offer['draw_no_bet']['odds'][1]['odds'] ?? 1; $odds['dnb2'] = number_format($offer['draw_no_bet']['odds'][1]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
OddsDnb::updateOrCreate([ $res = OddsDnb::where('event_id', $event->id)->where('bookmaker_id', $bookmaker_id)->first();
'event_id' => $event->id,
'bookmaker_id' => $bookmaker_id,
], $base + $odds);
}
/** $odds = array_merge($odds, $base);
* HALFTIME
*/ if (! $res) {
$offer = $data['results'][0]['half']['sp'] ?? ''; OddsDnb::create($odds);
} else {
$res->dnb1 = $odds['dnb1'];
$res->dnb2 = $odds['dnb2'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
}
/** /**
* 1X2 HT * 1X2 HT
*/ */
if (isset($offer['half_time_result'])) { if (isset($offer['half_time_result'])) {
$odds = []; $odds = [];
$odds['h3w'] = $offer['half_time_result']['odds'][0]['odds'] ?? 1; $odds['h3w'] = number_format($offer['half_time_result']['odds'][0]['odds'], 2) ?? 1;
$odds['d3w'] = $offer['half_time_result']['odds'][1]['odds'] ?? 1; $odds['d3w'] = number_format($offer['half_time_result']['odds'][1]['odds'], 2) ?? 1;
$odds['a3w'] = $offer['half_time_result']['odds'][2]['odds'] ?? 1; $odds['a3w'] = number_format($offer['half_time_result']['odds'][2]['odds'], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
Odds3wayHt::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event->id,
'bookmaker_id' => $bookmaker_id, $res = Odds3wayHt::where('event_id', $event->id)->where('bookmaker_id', $bookmaker_id)->first();
], $base + $odds);
if (! $res) {
Odds3wayHt::create($odds);
} else {
$res->h3w = $odds['h3w'];
$res->d3w = $odds['d3w'];
$res->d3w = $odds['a3w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
} }
+2 -2
View File
@@ -25,7 +25,7 @@ class Logifuture
{ {
$debug = Nuh::$options['d'] ?? 0; $debug = Nuh::$options['d'] ?? 0;
$sportmap = Sport::map('logi', 1, [1, 2, 3, 5]); $sportmap = Sport::map('logi', 1, [Nuh::$options['sport_id']]);
$event_id_collector = []; $event_id_collector = [];
@@ -60,7 +60,7 @@ class Logifuture
EventBookmaker::updateOrCreate([ EventBookmaker::updateOrCreate([
'event_id' => $event['id'], 'event_id' => $event['id'],
'bookmaker_id' => Nuh::$options['bookmaker_id'], 'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['in_feed' => 1, 'bmoid' => $event['event_id']]); ], ['in_feed' => 1, 'bmoid' => $event['event_id'], 'startime' => $event['startime']]);
$_spreads = []; $_spreads = [];
switch ($sport_id) { switch ($sport_id) {
@@ -3,6 +3,8 @@
namespace App\Console\Commands\Grapper\Logifuture; namespace App\Console\Commands\Grapper\Logifuture;
use App\Console\Commands\Grapper\Logifuture\Tools\PrinzipalHandicap; use App\Console\Commands\Grapper\Logifuture\Tools\PrinzipalHandicap;
use App\Models\OddsTotal;
use App\Utilities\Margin;
class Basketball class Basketball
{ {
@@ -45,35 +47,37 @@ class Basketball
switch ($market) { switch ($market) {
// NIGERIA // NIGERIA
case 'B_OUN': case 'B_OUN':
$n_totals[$name] = $value; $n_totals[$name] = number_format($value, 2);
break; break;
case 'B_1QOU': case 'B_1QOU':
$n_totals_qt[$name] = $value; $n_totals_qt[$name] = number_format($value, 2);
break; break;
case 'B_H': case 'B_H':
$n_points[$name] = $value; $n_points[$name] = number_format($value, 2);
break; break;
case 'B_1QH': case 'B_1QH':
$n_points_qt[$name] = $value; $n_points_qt[$name] = number_format($value, 2);
break; break;
// COLOMBIA // COLOMBIA
case 'B_OUHND': case 'B_OUHND':
$c_totals[$name] = $value; $c_totals[$name] = number_format($value, 2);
break; break;
case 'B_OUHND1P': case 'B_OUHND1P':
$c_totals_qt[$name] = $value; $c_totals_qt[$name] = number_format($value, 2);
break; break;
case 'B_12HND': case 'B_12HND':
$c_points[$name] = $value; $c_points[$name] = number_format($value, 2);
break; break;
case 'B_12HND1P': case 'B_12HND1P':
$c_points_qt[$name] = $value; $c_points_qt[$name] = number_format($value, 2);
break; break;
} }
} }
} }
dd($n_totals);
// COLUMBIA // COLUMBIA
if ($c_totals) { if ($c_totals) {
PrinzipalHandicap::filter($_spreads['total'], 'B_OUHND@', $c_totals, ['over', 'under', 'total']); PrinzipalHandicap::filter($_spreads['total'], 'B_OUHND@', $c_totals, ['over', 'under', 'total']);
@@ -101,5 +105,32 @@ class Basketball
if ($n_points_qt) { if ($n_points_qt) {
PrinzipalHandicap::filter($_spreads['point_qt'], 'B_1QH@', $n_points_qt, ['hth1', 'hth2', 'hcap']); PrinzipalHandicap::filter($_spreads['point_qt'], 'B_1QH@', $n_points_qt, ['hth1', 'hth2', 'hcap']);
} }
dd($n_totals);
if (\count($n_totals) == 2) {
$_total['margin'] = (float) Margin::calculate($n_totals, 1);
$_total = array_merge($_total, $base);
$res = OddsTotal::where('event_id', $event['id'])
->where('bookmaker_id', $event['bookmaker_id'])
->where('total', $event['total'])
->first();
if (! $res) {
OddsTotal::create($_total);
} else {
$res->over = number_format($_total['over'], 2);
$res->under = number_format($_total['under'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $_total['margin'];
$res->save();
}
}
} }
} }
@@ -2,6 +2,8 @@
namespace App\Console\Commands\Grapper\Logifuture; namespace App\Console\Commands\Grapper\Logifuture;
use App\Console\Commands\Grapper\Logifuture\Tools\PrinzipalHandicap;
class Icehockey class Icehockey
{ {
public static function get(&$event, &$_spreads, $match) public static function get(&$event, &$_spreads, $match)
@@ -14,22 +16,22 @@ class Icehockey
foreach ($match['odds'] as $name => $value) { foreach ($match['odds'] as $name => $value) {
switch ($name) { switch ($name) {
case 'IH_1X2_1': case 'IH_1X2_1':
$event['h3w'] = (float) $value; $event['h3w'] = number_format($value, 2);
break; break;
case 'IH_1X2_X': case 'IH_1X2_X':
$event['d3w'] = (float) $value; $event['d3w'] = number_format($value, 2);
break; break;
case 'IH_1X2_2': case 'IH_1X2_2':
$event['a3w'] = (float) $value; $event['a3w'] = number_format($value, 2);
break; break;
case 'IH_12_1': case 'IH_12_1':
case 'IH_12OTAP_1': case 'IH_12OTAP_1':
$event['h2w'] = (float) $value; $event['h2w'] = number_format($value, 2);
break; break;
case 'IH_12_2': case 'IH_12_2':
case 'IH_12OTAP_2': case 'IH_12OTAP_2':
$event['a2w'] = (float) $value; $event['a2w'] = number_format($value, 2);
break; break;
} }
@@ -59,18 +61,18 @@ class Icehockey
// COLUMBIA // COLUMBIA
if ($c_totals) { if ($c_totals) {
Filter::prinz($_spreads['total'], 'IH_OUHND@', $c_totals, ['over', 'under', 'total']); PrinzipalHandicap::filter($_spreads['total'], 'IH_OUHND@', $c_totals, ['over', 'under', 'total']);
} }
if ($c_points) { if ($c_points) {
Filter::prinz($_spreads['point'], 'IH_12HND@', $c_points, ['hth1', 'hth2', 'hcap']); PrinzipalHandicap::filter($_spreads['point'], 'IH_12HND@', $c_points, ['hth1', 'hth2', 'hcap']);
} }
// NIGERIA // NIGERIA
if ($n_totals) { if ($n_totals) {
Filter::prinz($_spreads['total'], 'IH_TF@', $n_totals, ['over', 'under', 'total']); PrinzipalHandicap::filter($_spreads['total'], 'IH_TF@', $n_totals, ['over', 'under', 'total']);
} }
if ($n_points) { if ($n_points) {
Filter::prinz($_spreads['point'], 'IH_HR1@', $n_points, ['hth1', 'hth2', 'hcap']); PrinzipalHandicap::filter($_spreads['point'], 'IH_HR1@', $n_points, ['hth1', 'hth2', 'hcap']);
} }
} }
} }
@@ -23,52 +23,54 @@ class Soccer
foreach ($match['odds'] as $name => $value) { foreach ($match['odds'] as $name => $value) {
switch ($name) { switch ($name) {
case 'S_1X2_1': case 'S_1X2_1':
$_3way['h3w'] = (float) $value; $_3way['h3w'] = number_format($value, 2);
break; break;
case 'S_1X2_X': case 'S_1X2_X':
$_3way['d3w'] = (float) $value; $_3way['d3w'] = number_format($value, 2);
break; break;
case 'S_1X2_2': case 'S_1X2_2':
$_3way['a3w'] = (float) $value; $_3way['a3w'] = number_format($value, 2);
break; break;
case 'S_OU@2.5_O': case 'S_OU@2.5_O':
$_total['over'] = (float) $value; $_total['over'] = number_format($value, 2);
break; break;
case 'S_OU@2.5_U': case 'S_OU@2.5_U':
$_total['under'] = (float) $value; $_total['under'] = number_format($value, 2);
break; break;
case 'S_GGNG_Y': case 'S_GGNG_Y':
$_ggng['gg'] = (float) $value; $_ggng['gg'] = number_format($value, 2);
break; break;
case 'S_GGNG_N': case 'S_GGNG_N':
$_ggng['ng'] = (float) $value; $_ggng['ng'] = number_format($value, 2);
break; break;
// case 'S_DNB_1': // case 'S_DNB_1':
// break; // break;
// case 'S_DNB_2': // case 'S_DNB_2':
// break; // break;
case 'S_DC_12': case 'S_DC_12':
$_dc['dc12'] = (float) $value; $_dc['dc12'] = number_format($value, 2);
break; break;
case 'S_DC_1X': case 'S_DC_1X':
$_dc['dc1x'] = (float) $value; $_dc['dc1x'] = number_format($value, 2);
break; break;
case 'S_DC_X2': case 'S_DC_X2':
$_dc['dcx2'] = (float) $value; $_dc['dcx2'] = number_format($value, 2);
break; break;
case 'S_12QUALIFY_1': case 'S_12QUALIFY_1':
$_tq['htq'] = (float) $value; $_tq['htq'] = number_format($value, 2);
break; break;
case 'S_12QUALIFY_2': case 'S_12QUALIFY_2':
$_tq['atq'] = (float) $value; $_tq['atq'] = number_format($value, 2);
break; break;
} }
} }
$base = []; $base = [];
$base['event_id'] = $event['id'];
$base['bookmaker_id'] = $event['bookmaker_id'];
$base['sport_id'] = $event['sport_id']; $base['sport_id'] = $event['sport_id'];
$base['provider_id'] = Nuh::$options['provider_id']; $base['provider_id'] = Nuh::$options['provider_id'];
$base['bmoid'] = $event['event_id']; $base['bmoid'] = $event['event_id'];
@@ -78,60 +80,121 @@ class Soccer
if (\count($_3way) == 3) { if (\count($_3way) == 3) {
$_3way['margin'] = (float) Margin::calculate($_3way, 1); $_3way['margin'] = (float) Margin::calculate($_3way, 1);
$_3way['starttime'] = $event['starttime'];
Odds3way::updateOrCreate([ $_3way = array_merge($_3way, $base);
'event_id' => $event['id'],
'bookmaker_id' => $event['bookmaker_id'], $res = Odds3way::where('event_id', $event['id'])->where('bookmaker_id', $event['bookmaker_id'])->first();
], $base + $_3way);
if (! $res) {
Odds3way::create($_3way);
} else {
$res->h3w = number_format($_3way['h3w'], 2);
$res->a3w = number_format($_3way['d3w'], 2);
$res->d3w = number_format($_3way['a3w'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->flag = 1;
$res->margin = $_3way['margin'];
$res->save();
}
} }
// OU // OU
if (\count($_total) == 2) { if (\count($_total) == 2) {
$_total['margin'] = (float) Margin::calculate($_total, 1); $_total['margin'] = (float) Margin::calculate($_total, 1);
$_total['total'] = 2.5; $_total['total'] = 2.5;
$_total['starttime'] = $event['starttime'];
$_total['active_spread'] = 1; $_total['active_spread'] = 1;
OddsTotal::updateOrCreate([ $_total = array_merge($_total, $base);
'event_id' => $event['id'],
'bookmaker_id' => $event['bookmaker_id'], $res = OddsTotal::where('event_id', $event['id'])
], $base + $_total); ->where('bookmaker_id', $event['bookmaker_id'])
->where('total', $event['total'])
->first();
if (! $res) {
OddsTotal::create($_total);
} else {
$res->over = number_format($_total['over'], 2);
$res->under = number_format($_total['under'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $_total['margin'];
$res->save();
}
} }
// GG NG // GG NG
if (\count($_ggng) == 2) { if (\count($_ggng) == 2) {
$_ggng['margin'] = (float) Margin::calculate($_ggng, 1); $_ggng['margin'] = (float) Margin::calculate($_ggng, 1);
$_ggng['starttime'] = $event['starttime'];
OddsGgng::updateOrCreate([ $_ggng = array_merge($_ggng, $base);
'event_id' => $event['id'],
'bookmaker_id' => $event['bookmaker_id'], $res = OddsGgng::where('event_id', $event['id'])->where('bookmaker_id', $event['bookmaker_id'])->first();
], $base + $_ggng);
if (! $res) {
OddsGgng::create($_ggng);
} else {
$res->gg = number_format($_ggng['gg'], 2);
$res->ng = number_format($_ggng['ng'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $_ggng['margin'];
$res->save();
}
} }
// DC // DC
if (\count($_dc) == 3) { if (\count($_dc) == 3) {
$_dc['margin'] = (float) Margin::calculate($_dc, 1); $_dc['margin'] = (float) Margin::calculate($_dc, 1);
$_dc['starttime'] = $event['starttime'];
OddsDc::updateOrCreate([ $_dc = array_merge($_dc, $base);
'event_id' => $event['id'],
'bookmaker_id' => $event['bookmaker_id'], $res = OddsDc::where('event_id', $event['id'])->where('bookmaker_id', $event['bookmaker_id'])->first();
], $base + $_dc);
if (! $res) {
OddsDc::create($_dc);
} else {
$res->dc1x = number_format($_dc['dc1x'], 2);
$res->dc12 = number_format($_dc['dc12'], 2);
$res->dcx2 = number_format($_dc['dcx2'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $_dc['margin'];
$res->save();
}
} }
// TQ // TQ
if (\count($_tq) == 2) { if (\count($_tq) == 2) {
$_tq['margin'] = (float) Margin::calculate($_tq, 1); $_tq['margin'] = (float) Margin::calculate($_tq, 1);
$_tq['starttime'] = $event['starttime'];
OddsTq::updateOrCreate([ $_tq = array_merge($_dc, $base);
'event_id' => $event['id'],
'bookmaker_id' => $event['bookmaker_id'], $res = OddsTq::where('event_id', $event['id'])->where('bookmaker_id', $event['bookmaker_id'])->first();
], $base + $_tq);
if (! $res) {
OddsTq::create($_dc);
} else {
$res->htq = number_format($_tq['htq'], 2);
$res->atq = number_format($_tq['atq'], 2);
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = now();
$res->margin = $_tq['margin'];
$res->save();
}
} }
} }
} }
@@ -2,6 +2,8 @@
namespace App\Console\Commands\Grapper\Logifuture; namespace App\Console\Commands\Grapper\Logifuture;
use App\Console\Commands\Grapper\Logifuture\Tools\PrinzipalHandicap;
class Tennis class Tennis
{ {
public static function get(&$event, &$_spreads, $match) public static function get(&$event, &$_spreads, $match)
@@ -14,17 +16,17 @@ class Tennis
foreach ($match['odds'] as $name => $value) { foreach ($match['odds'] as $name => $value) {
switch ($name) { switch ($name) {
case 'T_12_1': case 'T_12_1':
$event['h2w'] = (float) $value; $event['h2w'] = number_format($value, 2);
break; break;
case 'T_12_2': case 'T_12_2':
$event['a2w'] = (float) $value; $event['a2w'] = number_format($value, 2);
break; break;
case 'T_121P_1': case 'T_121P_1':
$_spreads['mlset1']['h2w'] = (float) $value; $_spreads['mlset1']['h2w'] = number_format($value, 2);
break; break;
case 'T_121P_2': case 'T_121P_2':
$_spreads['mlset1']['a2w'] = (float) $value; $_spreads['mlset1']['a2w'] = number_format($value, 2);
break; break;
} }
@@ -54,18 +56,18 @@ class Tennis
// COLUMBIA // COLUMBIA
if ($c_totals) { if ($c_totals) {
Filter::prinz($_spreads['total'], 'T_OUG@', $c_totals, ['over', 'under', 'total']); PrinzipalHandicap::filter($_spreads['total'], 'T_OUG@', $c_totals, ['over', 'under', 'total']);
} }
if ($c_points) { if ($c_points) {
Filter::prinz($_spreads['point'], 'T_HNDGAMES@', $c_points, ['hth1', 'hth2', 'hcap']); PrinzipalHandicap::filter($_spreads['point'], 'T_HNDGAMES@', $c_points, ['hth1', 'hth2', 'hcap']);
} }
// NIGERIA // NIGERIA
if ($n_totals) { if ($n_totals) {
Filter::prinz($_spreads['total'], 'T_OUG@', $n_totals, ['over', 'under', 'total']); PrinzipalHandicap::filter($_spreads['total'], 'T_OUG@', $n_totals, ['over', 'under', 'total']);
} }
if ($n_points) { if ($n_points) {
Filter::prinz($_spreads['point'], 'T_GH@', $n_points, ['hth1', 'hth2', 'hcap']); PrinzipalHandicap::filter($_spreads['point'], 'T_GH@', $n_points, ['hth1', 'hth2', 'hcap']);
} }
} }
} }
+165 -45
View File
@@ -12,6 +12,7 @@ use App\Models\Event;
use App\Models\EventBookmaker; use App\Models\EventBookmaker;
use App\Models\Odds3way; use App\Models\Odds3way;
use App\Models\OddsDc; use App\Models\OddsDc;
use App\Models\OddsGgng;
use App\Models\OddsPoint; use App\Models\OddsPoint;
use App\Models\OddsPointQ1; use App\Models\OddsPointQ1;
use App\Models\OddsTotal; use App\Models\OddsTotal;
@@ -63,17 +64,20 @@ class Odds
if ($event_id) { if ($event_id) {
$base = []; $base = [];
$base['event_id'] = $event_id;
$base['bookmaker_id'] = Nuh::$options['bookmaker_id'];
$base['sport_id'] = $sport_id; $base['sport_id'] = $sport_id;
$base['provider_id'] = Nuh::$options['provider_id']; $base['provider_id'] = Nuh::$options['provider_id'];
$base['bmoid'] = preg_replace('/\D/', '', $match['i']); $base['bmoid'] = preg_replace('/\D/', '', $match['i']);
$base['flag'] = 1; $base['flag'] = 1;
$base['checked_at'] = now();
$event_id_collector[] = $event_id; $event_id_collector[] = $event_id;
EventBookmaker::updateOrCreate([ EventBookmaker::updateOrCreate([
'event_id' => $event_id, 'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], 'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['in_feed' => 1, 'bmoid' => $base['bmoid']]); ], ['starttime' => $starttime, 'in_feed' => 1, 'bmoid' => $base['bmoid']]);
// if ($event_id == 13913478) { // if ($event_id == 13913478) {
// dd($match['M']); // dd($match['M']);
@@ -84,59 +88,104 @@ class Odds
case 1: case 1:
// 1x2 // 1x2
$odds = []; $odds = [];
$odds['h3w'] = $value['static'][1] ?? 1; $odds['h3w'] = number_format($value['static'][1], 2) ?? 1;
$odds['d3w'] = $value['static'][2] ?? 1; $odds['d3w'] = number_format($value['static'][2], 2) ?? 1;
$odds['a3w'] = $value['static'][3] ?? 1; $odds['a3w'] = number_format($value['static'][3], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
$odds['starttime'] = $starttime; $odds = array_merge($odds, $base);
Odds3way::updateOrCreate([ $res = Odds3way::where('event_id', $event_id)->where('bookmaker_id', Nuh::$options['bookmaker_id'])->first();
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], if (! $res) {
], $base + $odds); Odds3way::create($odds);
} else {
$res->h3w = $odds['h3w'];
$res->a3w = $odds['d3w'];
$res->d3w = $odds['a3w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 2: case 2:
// to qalify // to qalify
$odds = []; $odds = [];
$odds['htq'] = $value['static'][4] ?? 1; $odds['htq'] = number_format($value['static'][4], 2) ?? 1;
$odds['atq'] = $value['static'][5] ?? 1; $odds['atq'] = number_format($value['static'][5], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
$odds = array_merge($odds, $base);
OddsTq::updateOrCreate([ $res = OddsTq::where('event_id', $event_id)->where('bookmaker_id', Nuh::$options['bookmaker_id'])->first();
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], if (! $res) {
], $base + $odds); OddsTq::create($odds);
} else {
$res->htq = $odds['htq'];
$res->atq = $odds['atq'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 10: case 10:
// double chance // double chance
$odds = []; $odds = [];
$odds['dc1x'] = $value['static'][9] ?? 1; $odds['dc1x'] = number_format($value['static'][9], 2) ?? 1;
$odds['dc12'] = $value['static'][10] ?? 1; $odds['dc12'] = number_format($value['static'][10], 2) ?? 1;
$odds['dcx2'] = $value['static'][11] ?? 1; $odds['dcx2'] = number_format($value['static'][11], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
$odds = array_merge($odds, $base);
OddsDc::updateOrCreate([ $res = OddsDc::where('event_id', $event_id)->where('bookmaker_id', Nuh::$options['bookmaker_id'])->first();
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], if (! $res) {
], $base + $odds); OddsDc::create($odds);
} else {
$res->dc1x = $odds['dc1x'];
$res->dc12 = $odds['dc12'];
$res->dcx2 = $odds['dcx2'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 27: case 27:
// ggng // ggng
$odds = []; $odds = [];
$odds['gg'] = $value['static'][74] ?? 1; $odds['gg'] = number_format($value['static'][74], 2) ?? 1;
$odds['ng'] = $value['static'][76] ?? 1; $odds['ng'] = number_format($value['static'][76], 2) ?? 1;
$odds['margin'] = (float) Margin::calculate($odds, 1); $odds['margin'] = (float) Margin::calculate($odds, 1);
$odds = array_merge($odds, $base);
OddsDc::updateOrCreate([ $res = OddsGgng::where('event_id', $event_id)->where('bookmaker_id', Nuh::$options['bookmaker_id'])->first();
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], if (! $res) {
], $base + $odds); OddsGgng::create($odds);
} else {
$res->gg = $odds['gg'];
$res->ng = $odds['ng'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
@@ -144,43 +193,114 @@ class Odds
case 2000: case 2000:
// points // points
$odds = FilterHandicap::get($value); $odds = FilterHandicap::get($value);
$odds['starttime'] = $starttime;
OddsPoint::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], $res = OddsPoint::where('event_id', $event_id)
], $base + $odds); ->where('bookmaker_id', Nuh::$options['bookmaker_id'])
->where('handicap', $odds['handicap'])
->first();
if (! $res) {
OddsPoint::create($odds);
} else {
$res->home = $odds['home'];
$res->away = $odds['away'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->difference = $odds['difference'];
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 2025: case 2025:
// points qt // points qt
$odds = FilterHandicapQ1::get($value); $odds = FilterHandicapQ1::get($value);
OddsPointQ1::updateOrCreate([
'event_id' => $event_id, $odds = array_merge($odds, $base);
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], $base + $odds); $res = OddsPointQ1::where('event_id', $event_id)
->where('bookmaker_id', Nuh::$options['bookmaker_id'])
->where('handicap', $odds['handicap'])
->first();
if (! $res) {
OddsPointQ1::create($odds);
} else {
$res->home = $odds['home'];
$res->away = $odds['away'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->difference = $odds['difference'];
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 17: case 17:
case 2002: case 2002:
// totals // totals
$odds = FilterTotals::get($value, $sport_id); $odds = FilterTotals::get($value, $sport_id);
$odds = array_merge($odds, $base);
if ($base['sport_id'] == 1) { if ($base['sport_id'] == 1) {
$odds['active_spread'] = 1; $odds['active_spread'] = 1;
} }
OddsTotal::updateOrCreate([
'event_id' => $event_id, $res = OddsTotal::where('event_id', $event_id)
'bookmaker_id' => Nuh::$options['bookmaker_id'], ->where('bookmaker_id', Nuh::$options['bookmaker_id'])
], $base + $odds); ->where('total', $odds['total'])
->first();
if (! $res) {
OddsTotal::create($odds);
} else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->difference = $odds['difference'];
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
case 2012: case 2012:
// totals qt // totals qt
$odds = FilterTotalsQ1::get($value, $sport_id); $odds = FilterTotalsQ1::get($value, $sport_id);
OddsTotalQ1::updateOrCreate([ $odds = array_merge($odds, $base);
'event_id' => $event_id,
'bookmaker_id' => Nuh::$options['bookmaker_id'], if ($base['sport_id'] == 1) {
], $base + $odds); $odds['active_spread'] = 1;
}
$res = OddsTotalQ1::where('event_id', $event_id)
->where('bookmaker_id', Nuh::$options['bookmaker_id'])
->where('total', $odds['total'])
->first();
if (! $res) {
OddsTotalQ1::create($odds);
} else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->difference = $odds['difference'];
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
break; break;
} }
} }
@@ -12,8 +12,8 @@ class FilterHandicap
foreach ($_array as $handicap => $value) { foreach ($_array as $handicap => $value) {
if (fmod(abs($handicap), 1) == 0.5) { if (fmod(abs($handicap), 1) == 0.5) {
if ($value[1714] > 1 and $value[1715] > 1) { if ($value[1714] > 1 and $value[1715] > 1) {
$_points[$handicap]['home'] = $value[1714]; $_points[$handicap]['home'] = number_format($value[1714], 2);
$_points[$handicap]['away'] = $value[1715]; $_points[$handicap]['away'] = number_format($value[1715], 2);
} }
} }
} }
@@ -39,6 +39,7 @@ class FilterHandicap
if ($handicap) { if ($handicap) {
$return['home'] = $_points[$handicap]['home']; $return['home'] = $_points[$handicap]['home'];
$return['away'] = $_points[$handicap]['away']; $return['away'] = $_points[$handicap]['away'];
$return['difference'] = abs(1 / $return['home'] - 1 / $return['away']);
$return['margin'] = (float) Margin::calculate($return, 1); $return['margin'] = (float) Margin::calculate($return, 1);
$return['handicap'] = $handicap; $return['handicap'] = $handicap;
} }
@@ -14,8 +14,8 @@ class FilterHandicapQ1
$handicap = $t[1]; $handicap = $t[1];
if (fmod(abs($handicap), 1) == 0.5) { if (fmod(abs($handicap), 1) == 0.5) {
if ($value[1714] > 1 and $value[1715] > 1) { if ($value[1714] > 1 and $value[1715] > 1) {
$_points[$handicap]['home'] = $value[1714]; $_points[$handicap]['home'] = number_format($value[1714], 2);
$_points[$handicap]['away'] = $value[1715]; $_points[$handicap]['away'] = number_format($value[1715], 2);
} }
} }
} }
@@ -41,6 +41,7 @@ class FilterHandicapQ1
if ($handicap) { if ($handicap) {
$return['home'] = $_points[$handicap]['home']; $return['home'] = $_points[$handicap]['home'];
$return['away'] = $_points[$handicap]['away']; $return['away'] = $_points[$handicap]['away'];
$return['difference'] = abs(1 / $return['home'] - 1 / $return['away']);
$return['margin'] = (float) Margin::calculate($return, 1); $return['margin'] = (float) Margin::calculate($return, 1);
$return['handicap'] = $handicap; $return['handicap'] = $handicap;
} }
@@ -12,8 +12,8 @@ class FilterTotals
foreach ($_array as $total => $value) { foreach ($_array as $total => $value) {
if (fmod(abs($total), 1) == 0.5) { if (fmod(abs($total), 1) == 0.5) {
if ($value[12] > 1 and $value[13] > 1) { if ($value[12] > 1 and $value[13] > 1) {
$_totals[$total]['over'] = $value[12]; $_totals[$total]['over'] = number_format($value[12], 2);
$_totals[$total]['under'] = $value[13]; $_totals[$total]['under'] = number_format($value[13], 2);
} }
} }
} }
@@ -42,6 +42,7 @@ class FilterTotals
if (isset($_totals[$spread])) { if (isset($_totals[$spread])) {
$return['over'] = $_totals[$spread]['over']; $return['over'] = $_totals[$spread]['over'];
$return['under'] = $_totals[$spread]['under']; $return['under'] = $_totals[$spread]['under'];
$return['difference'] = abs(1 / $return['over'] - 1 / $return['under']);
$return['margin'] = (float) Margin::calculate($return, 1); $return['margin'] = (float) Margin::calculate($return, 1);
$return['total'] = $spread; $return['total'] = $spread;
} }
@@ -14,8 +14,8 @@ class FilterTotalsQ1
$t = explode('_', $total); $t = explode('_', $total);
$total = $t[1]; $total = $t[1];
if ($value[12] > 1 and $value[13] > 1) { if ($value[12] > 1 and $value[13] > 1) {
$_totals[$total]['over'] = $value[12]; $_totals[$total]['over'] = number_format($value[12], 2);
$_totals[$total]['under'] = $value[13]; $_totals[$total]['under'] = number_format($value[13], 2);
} }
} }
} }
@@ -44,6 +44,7 @@ class FilterTotalsQ1
if (isset($_totals[$spread])) { if (isset($_totals[$spread])) {
$return['over'] = $_totals[$spread]['over']; $return['over'] = $_totals[$spread]['over'];
$return['under'] = $_totals[$spread]['under']; $return['under'] = $_totals[$spread]['under'];
$return['difference'] = abs(1 / $return['over'] - 1 / $return['under']);
$return['margin'] = (float) Margin::calculate($return, 1); $return['margin'] = (float) Margin::calculate($return, 1);
$return['total'] = $spread; $return['total'] = $spread;
} }
+60 -61
View File
@@ -254,8 +254,6 @@ class Odds
]; ];
ElementGroup::updateOrCreate(['element_id' => (int) $row->ateam['id'], 'group_id' => (int) $row->group['id']], $element_group); ElementGroup::updateOrCreate(['element_id' => (int) $row->ateam['id'], 'group_id' => (int) $row->group['id']], $element_group);
Nuh::$collector = [];
foreach ($row->bookmaker as $book) { foreach ($row->bookmaker as $book) {
$bookmaker_id = (int) $book['bid']; $bookmaker_id = (int) $book['bid'];
@@ -265,6 +263,7 @@ class Odds
$odds['bookmaker_id'] = $bookmaker_id; $odds['bookmaker_id'] = $bookmaker_id;
$odds['sport_id'] = $sport_id; $odds['sport_id'] = $sport_id;
$odds['provider_id'] = Nuh::$options['provider_id']; $odds['provider_id'] = Nuh::$options['provider_id'];
$odds['checked_at'] = now();
foreach ($book->offer as $offer) { foreach ($book->offer as $offer) {
@@ -302,71 +301,71 @@ class Odds
_3Way::grap($odds, $offer); _3Way::grap($odds, $offer);
break; break;
// case 1: case 1:
// foreach ($offer->odds->attributes() as $attributeName => $attributeValue) { foreach ($offer->odds->attributes() as $attributeName => $attributeValue) {
// switch ($attributeName) { switch ($attributeName) {
// case 'starting_time': case 'starting_time':
// EventBookmaker::updateOrInsert([ EventBookmaker::updateOrInsert([
// 'event_id' => Nuh::$id, 'event_id' => $event_id,
// 'bookmaker_id' => Nuh::$bookmaker_id, 'bookmaker_id' => $bookmaker_id,
// ], ['starttime' => $attributeValue]); ], ['starttime' => $attributeValue]);
// break; break;
// } }
// } }
// _2Way::grap($odds, $offer); _2Way::grap($odds, $offer);
// break; break;
// case 3: case 3:
// foreach ($offer->odds->attributes() as $attributeName => $attributeValue) { foreach ($offer->odds->attributes() as $attributeName => $attributeValue) {
// switch ($attributeName) { switch ($attributeName) {
// case 'starting_time': case 'starting_time':
// EventBookmaker::updateOrInsert([ EventBookmaker::updateOrInsert([
// 'event_id' => Nuh::$id, 'event_id' => $event_id,
// 'bookmaker_id' => Nuh::$bookmaker_id, 'bookmaker_id' => $bookmaker_id,
// ], ['starttime' => $attributeValue]); ], ['starttime' => $attributeValue]);
// break; break;
// } }
// } }
// _Points::grap($odds, $offer); _Points::grap($odds, $offer);
// break; break;
// case 4: case 4:
// _Totals::grap($odds, $offer); _Totals::grap($odds, $offer);
// break; break;
// case 131073: case 131073:
// _2WayS1::grap($odds, $offer); _2WayS1::grap($odds, $offer);
// break; break;
// case 65536: case 65536:
// _3WayHt::grap($odds, $offer); _3WayHt::grap($odds, $offer);
// break; break;
// case 65540: case 65540:
// _TotalsHt::grap($odds, $offer); _TotalsHt::grap($odds, $offer);
// break; break;
// case 65539: case 65539:
// _PointsHt::grap($odds, $offer); _PointsHt::grap($odds, $offer);
// break; break;
// case 131075: case 131075:
// _PointsQ1::grap($odds, $offer); _PointsQ1::grap($odds, $offer);
// break; break;
// case 131076: case 131076:
// _TotalsQ1::grap($odds, $offer); _TotalsQ1::grap($odds, $offer);
// break; break;
// case 5242880: case 5242880:
// _Dc::grap($odds, $offer); _Dc::grap($odds, $offer);
// break; break;
// case 6291457: case 6291457:
// _Dnb::grap($odds, $offer); _Dnb::grap($odds, $offer);
// break; break;
// case 11534337: case 11534337:
// _Ggng::grap($odds, $offer); _Ggng::grap($odds, $offer);
// break; break;
// case 7340033: case 7340033:
// _Tq::grap($odds, $offer); _Tq::grap($odds, $offer);
// break; break;
default: default:
Notice::note('switch bettype ID not found: '.$bettypeid, 'r'); Notice::note('switch bettype ID not found: '.$bettypeid, 'r');
@@ -2,47 +2,56 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds\Tools; namespace App\Console\Commands\Grapper\TxOdds\Odds\Tools;
use App\Console\Commands\Nuh;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
class ActiveSpread class ActiveSpread
{ {
public static $collector = [];
public static $event_id = 0;
public static $provider_id = 0;
public static function collect($odds, $bettype) public static function collect($odds, $bettype)
{ {
if (! isset(Nuh::$collector[$bettype][Nuh::$bookmaker_id]['difference'])) { if ($odds['event_id'] != self::$event_id) {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['difference'] = $odds['difference']; self::$event_id = $odds['event_id'];
self::$provider_id = $odds['provider_id'];
self::$collector = [];
}
if (! isset(self::$collector[$bettype][$odds['bookmaker_id']]['difference'])) {
self::$collector[$bettype][$odds['bookmaker_id']]['difference'] = $odds['difference'];
if (isset($odds['handicap'])) { if (isset($odds['handicap'])) {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['active_spread'] = $odds['handicap']; self::$collector[$bettype][$odds['bookmaker_id']]['active_spread'] = $odds['handicap'];
} else { } else {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['active_spread'] = $odds['total']; self::$collector[$bettype][$odds['bookmaker_id']]['active_spread'] = $odds['total'];
} }
} elseif ($odds['difference'] < Nuh::$collector[$bettype][Nuh::$bookmaker_id]['difference']) { } elseif ($odds['difference'] < self::$collector[$bettype][$odds['bookmaker_id']]['difference']) {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['difference'] = $odds['difference']; self::$collector[$bettype][$odds['bookmaker_id']]['difference'] = $odds['difference'];
if (isset($odds['handicap'])) { if (isset($odds['handicap'])) {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['active_spread'] = $odds['handicap']; self::$collector[$bettype][$odds['bookmaker_id']]['active_spread'] = $odds['handicap'];
} else { } else {
Nuh::$collector[$bettype][Nuh::$bookmaker_id]['active_spread'] = $odds['total']; self::$collector[$bettype][$odds['bookmaker_id']]['active_spread'] = $odds['total'];
} }
} }
} }
public static function set() public static function set()
{ {
foreach (self::$collector as $table => $value) {
foreach (Nuh::$collector as $table => $value) { DB::table($table)->where('event_id', self::$event_id)->where('provider_id', self::$provider_id)->update(['active_spread' => 0]);
DB::table($table)->where('event_id', Nuh::$id)->where('provider_id', Nuh::$options['provider_id'])->update(['active_spread' => 0]);
} }
foreach (Nuh::$collector as $table => $bookmaker) { foreach (self::$collector as $table => $bookmaker) {
foreach ($bookmaker as $bookmaker_id => $values) { foreach ($bookmaker as $bookmaker_id => $values) {
if (in_array($table, ['odds_points', 'odds_points_ht', 'odds_points_q1'])) { if (in_array($table, ['odds_points', 'odds_points_ht', 'odds_points_q1'])) {
DB::table($table) DB::table($table)
->where('event_id', Nuh::$id) ->where('event_id', self::$event_id)
->where('bookmaker_id', $bookmaker_id) ->where('bookmaker_id', $bookmaker_id)
->where('handicap', $values['active_spread']) ->where('handicap', $values['active_spread'])
->update(['active_spread' => 1]); ->update(['active_spread' => 1]);
} else { } else {
DB::table($table) DB::table($table)
->where('event_id', Nuh::$id) ->where('event_id', self::$event_id)
->where('bookmaker_id', $bookmaker_id) ->where('bookmaker_id', $bookmaker_id)
->where('total', $values['active_spread']) ->where('total', $values['active_spread'])
->update(['active_spread' => 1]); ->update(['active_spread' => 1]);
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\Odds2way;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _2Way class _2Way
{ {
@@ -14,14 +14,20 @@ class _2Way
$odds['a2w'] = (float) $value->o3; $odds['a2w'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1); $odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1);
$odds['updated_at'] = now();
DB::table('odds_2ways')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = Odds2way::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['h2w', 'a2w', 'margin', 'flags', 'updated_at'] if (! $res) {
Odds2way::create($odds);
); } else {
$res->h2w = $odds['h2w'];
$res->a2w = $odds['a2w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\Odds2wayS1;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _2WayS1 class _2WayS1
{ {
@@ -14,14 +14,20 @@ class _2WayS1
$odds['a2w'] = (float) $value->o3; $odds['a2w'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1); $odds['margin'] = (float) Margin::calculate([$odds['h2w'], $odds['a2w']], 1);
$odds['updated_at'] = now();
DB::table('odds_2ways_s1')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = Odds2wayS1::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['h2w', 'a2w', 'margin', 'flags', 'updated_at'] if (! $res) {
Odds2wayS1::create($odds);
); } else {
$res->h2w = $odds['h2w'];
$res->a2w = $odds['a2w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -13,18 +13,23 @@ class _3Way
$odds['h3w'] = (float) $value->o1; $odds['h3w'] = (float) $value->o1;
$odds['d3w'] = (float) $value->o2; $odds['d3w'] = (float) $value->o2;
$odds['a3w'] = (float) $value->o3; $odds['a3w'] = (float) $value->o3;
$odds['a3w'] = (float) 1.1;
} }
$odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1); $odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1);
$res = Odds3way::updateOrCreate(
['event_id' => $odds['event_id'], 'bookmaker_id' => $odds['bookmaker_id']], $res = Odds3way::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
$odds,
); if (! $res) {
if ($res->wasChanged('h3w', 'd3w', 'h3w')) { Odds3way::create($odds);
$res = Odds3way::updateOrCreate( } else {
['event_id' => $odds['event_id'], 'bookmaker_id' => $odds['bookmaker_id']], $res->h3w = $odds['h3w'];
['oddchange_at' => now()], $res->a3w = $odds['d3w'];
); $res->d3w = $odds['a3w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
} }
} }
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\Odds3wayHt;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _3WayHt class _3WayHt
{ {
@@ -15,14 +15,21 @@ class _3WayHt
$odds['a3w'] = (float) $value->o3; $odds['a3w'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1); $odds['margin'] = (float) Margin::calculate([$odds['h3w'], $odds['d3w'], $odds['a3w']], 1);
$odds['updated_at'] = now();
DB::table('odds_3ways_ht')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = Odds3wayHt::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['h3w', 'd3w', 'a3w', 'margin', 'flags', 'updated_at'] if (! $res) {
Odds3wayHt::create($odds);
); } else {
$res->h3w = $odds['h3w'];
$res->d3w = $odds['d3w'];
$res->d3w = $odds['a3w'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\OddsDc;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Dc class _Dc
{ {
@@ -15,14 +15,21 @@ class _Dc
$odds['dcx2'] = (float) $value->o3; $odds['dcx2'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['dc1x'], $odds['dc12'], $odds['dcx2']], 1); $odds['margin'] = (float) Margin::calculate([$odds['dc1x'], $odds['dc12'], $odds['dcx2']], 1);
$odds['updated_at'] = now();
DB::table('odds_dc')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = OddsDc::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['dc1x', 'dc12', 'dcx2', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsDc::create($odds);
); } else {
$res->dc1x = $odds['dc1x'];
$res->dc12 = $odds['dc12'];
$res->dcx2 = $odds['dcx2'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\OddsDnb;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Dnb class _Dnb
{ {
@@ -14,14 +14,20 @@ class _Dnb
$odds['dnb2'] = (float) $value->o3; $odds['dnb2'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['dnb1'], $odds['dnb2']], 1); $odds['margin'] = (float) Margin::calculate([$odds['dnb1'], $odds['dnb2']], 1);
$odds['updated_at'] = now();
DB::table('odds_dnb')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = OddsDnb::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['dnb1', 'dnb2', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsDnb::create($odds);
); } else {
$res->dnb1 = $odds['dnb1'];
$res->dnb2 = $odds['dnb2'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\OddsGgng;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Ggng class _Ggng
{ {
@@ -14,14 +14,20 @@ class _Ggng
$odds['ng'] = (float) $value->o3; $odds['ng'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['gg'], $odds['ng']], 1); $odds['margin'] = (float) Margin::calculate([$odds['gg'], $odds['ng']], 1);
$odds['updated_at'] = now();
DB::table('odds_ggng')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = OddsGgng::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['gg', 'ng', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsGgng::create($odds);
); } else {
$res->gg = $odds['gg'];
$res->ng = $odds['ng'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsPoint;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Points class _Points
{ {
@@ -20,18 +20,27 @@ class _Points
return; return;
} }
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
$odds['updated_at'] = now();
DB::table('odds_points')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds,
['event_id', 'bookmaker_id', 'handicap'], $res = OddsPoint::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('handicap', $odds['handicap'])
->first();
['home', 'away', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsPoint::create($odds);
); } else {
$res->home = $odds['home'];
$res->away = $odds['away'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_points'); ActiveSpread::collect($odds, 'odds_points');
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsPointHt;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _PointsHt class _PointsHt
{ {
@@ -20,18 +20,27 @@ class _PointsHt
return; return;
} }
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
$odds['updated_at'] = now();
DB::table('odds_points_ht')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds,
['event_id', 'bookmaker_id', 'handicap'], $res = OddsPointHt::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('handicap', $odds['handicap'])
->first();
['home', 'away', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsPointHt::create($odds);
); } else {
$res->home = $odds['home'];
$res->away = $odds['away'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_points_ht'); ActiveSpread::collect($odds, 'odds_points_ht');
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsPointQ1;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _PointsQ1 class _PointsQ1
{ {
@@ -20,18 +20,27 @@ class _PointsQ1
return; return;
} }
$odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']); $odds['difference'] = abs(1 / $odds['home'] - 1 / $odds['away']);
$odds['updated_at'] = now();
DB::table('odds_points_q1')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['home'], $odds['away']], 1);
$odds,
['event_id', 'bookmaker_id', 'handicap'], $res = OddsPointQ1::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('handicap', $odds['handicap'])
->first();
['home', 'away', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsPointQ1::create($odds);
); } else {
$res->home = $odds['home'];
$res->away = $odds['away'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_points_q1'); ActiveSpread::collect($odds, 'odds_points_q1');
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsTotal;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Totals class _Totals
{ {
@@ -26,18 +26,27 @@ class _Totals
} }
} }
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
$odds['updated_at'] = now();
DB::table('odds_totals')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds,
['event_id', 'bookmaker_id', 'total'], $res = OddsTotal::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('total', $odds['total'])
->first();
['over', 'under', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsTotal::create($odds);
); } else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_totals'); ActiveSpread::collect($odds, 'odds_totals');
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsTotalHt;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _TotalsHt class _TotalsHt
{ {
@@ -26,18 +26,27 @@ class _TotalsHt
} }
} }
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
$odds['updated_at'] = now();
DB::table('odds_totals_ht')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds,
['event_id', 'bookmaker_id', 'total'], $res = OddsTotalHt::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('total', $odds['total'])
->first();
['over', 'under', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsTotalHt::create($odds);
); } else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_totals_ht'); ActiveSpread::collect($odds, 'odds_totals_ht');
} }
@@ -3,8 +3,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread; use App\Console\Commands\Grapper\TxOdds\Odds\Tools\ActiveSpread;
use App\Models\OddsTotalQ1;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _TotalsQ1 class _TotalsQ1
{ {
@@ -26,18 +26,27 @@ class _TotalsQ1
} }
} }
$odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']); $odds['difference'] = abs(1 / $odds['over'] - 1 / $odds['under']);
$odds['updated_at'] = now();
DB::table('odds_totals_q1')->upsert( $odds['margin'] = (float) Margin::calculate([$odds['over'], $odds['under']], 1);
$odds,
['event_id', 'bookmaker_id', 'total'], $res = OddsTotalQ1::where('event_id', $odds['event_id'])
->where('bookmaker_id', $odds['bookmaker_id'])
->where('total', $odds['total'])
->first();
['over', 'under', 'difference', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsTotalQ1::create($odds);
); } else {
$res->over = $odds['over'];
$res->under = $odds['under'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
ActiveSpread::collect($odds, 'odds_totals_q1'); ActiveSpread::collect($odds, 'odds_totals_q1');
} }
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper\TxOdds\Odds; namespace App\Console\Commands\Grapper\TxOdds\Odds;
use App\Models\OddsTq;
use App\Utilities\Margin; use App\Utilities\Margin;
use Illuminate\Support\Facades\DB;
class _Tq class _Tq
{ {
@@ -14,14 +14,20 @@ class _Tq
$odds['atq'] = (float) $value->o3; $odds['atq'] = (float) $value->o3;
} }
$odds['margin'] = (float) Margin::calculate([$odds['htq'], $odds['atq']], 1); $odds['margin'] = (float) Margin::calculate([$odds['htq'], $odds['atq']], 1);
$odds['updated_at'] = now();
DB::table('odds_tq')->upsert(
$odds,
['event_id', 'bookmaker_id'], $res = OddsTq::where('event_id', $odds['event_id'])->where('bookmaker_id', $odds['bookmaker_id'])->first();
['htq', 'atq', 'margin', 'flags', 'updated_at'] if (! $res) {
OddsTq::create($odds);
); } else {
$res->htq = $odds['htq'];
$res->atq = $odds['atq'];
if ($res->isDirty()) {
$res->oddchange_at = now();
}
$res->checked_at = $odds['checked_at'];
$res->margin = $odds['margin'];
$res->save();
}
} }
} }
-4
View File
@@ -21,10 +21,6 @@ class Nuh extends Command
public static $id = 0; public static $id = 0;
public static $bookmaker_id;
public static $collector = [];
protected $signature = 'nuh {process=help} {--id=0} {--fn=} {--p} {--d} {--x} {--t} {--w} {--g} {--a} {--r} {--s} {--t} {--q} {--f}'; protected $signature = 'nuh {process=help} {--id=0} {--fn=} {--p} {--d} {--x} {--t} {--w} {--g} {--a} {--r} {--s} {--t} {--q} {--f}';
public function handle() public function handle()
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+6
View File
@@ -8,6 +8,11 @@ class Odds2way extends Model
{ {
protected $table = 'odds_2ways'; protected $table = 'odds_2ways';
protected $casts = [
'h2w' => 'float',
'a2w' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -21,6 +26,7 @@ class Odds2way extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class Odds2wayS1 extends Model
{ {
protected $table = 'odds_2ways_s1'; protected $table = 'odds_2ways_s1';
protected $casts = [
'h2w' => 'float',
'a2w' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -21,6 +26,7 @@ class Odds2wayS1 extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+7
View File
@@ -8,6 +8,12 @@ class Odds3way extends Model
{ {
protected $table = 'odds_3ways'; protected $table = 'odds_3ways';
protected $casts = [
'h3w' => 'float',
'd3w' => 'float',
'a3w' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -22,6 +28,7 @@ class Odds3way extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+7
View File
@@ -8,6 +8,12 @@ class Odds3wayHt extends Model
{ {
protected $table = 'odds_3ways_ht'; protected $table = 'odds_3ways_ht';
protected $casts = [
'h3w' => 'float',
'd3w' => 'float',
'a3w' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -22,6 +28,7 @@ class Odds3wayHt extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+7
View File
@@ -8,6 +8,12 @@ class OddsDc extends Model
{ {
protected $table = 'odds_dc'; protected $table = 'odds_dc';
protected $casts = [
'dc1x' => 'float',
'dc12' => 'float',
'dc2x' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -22,6 +28,7 @@ class OddsDc extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsDnb extends Model
{ {
protected $table = 'odds_dnb'; protected $table = 'odds_dnb';
protected $casts = [
'dnb1' => 'float',
'dnb2' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -21,6 +26,7 @@ class OddsDnb extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsGgng extends Model
{ {
protected $table = 'odds_ggng'; protected $table = 'odds_ggng';
protected $casts = [
'gg' => 'float',
'ng' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -21,6 +26,7 @@ class OddsGgng extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsPoint extends Model
{ {
protected $table = 'odds_points'; protected $table = 'odds_points';
protected $casts = [
'home' => 'float',
'away' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsPoint extends Model
'active_spread', 'active_spread',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsPointHt extends Model
{ {
protected $table = 'odds_points_ht'; protected $table = 'odds_points_ht';
protected $casts = [
'home' => 'float',
'away' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsPointHt extends Model
'active_spread', 'active_spread',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsPointQ1 extends Model
{ {
protected $table = 'odds_points_q1'; protected $table = 'odds_points_q1';
protected $casts = [
'home' => 'float',
'away' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsPointQ1 extends Model
'active_spread', 'active_spread',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsTotal extends Model
{ {
protected $table = 'odds_totals'; protected $table = 'odds_totals';
protected $casts = [
'over' => 'float',
'under' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsTotal extends Model
'active_spread', 'active_spread',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsTotalHt extends Model
{ {
protected $table = 'odds_totals_ht'; protected $table = 'odds_totals_ht';
protected $casts = [
'over' => 'float',
'under' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsTotalHt extends Model
'active_spread', 'active_spread',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsTotalQ1 extends Model
{ {
protected $table = 'odds_totals_q1'; protected $table = 'odds_totals_q1';
protected $casts = [
'over' => 'float',
'under' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -24,6 +29,7 @@ class OddsTotalQ1 extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
+6
View File
@@ -8,6 +8,11 @@ class OddsTq extends Model
{ {
protected $table = 'odds_tq'; protected $table = 'odds_tq';
protected $casts = [
'htq' => 'float',
'atq' => 'float',
];
protected $fillable = [ protected $fillable = [
'id', 'id',
'event_id', 'event_id',
@@ -21,6 +26,7 @@ class OddsTq extends Model
'margin', 'margin',
'flags', 'flags',
'nuh_check', 'nuh_check',
'checked_at',
'oddchange_at', 'oddchange_at',
]; ];
Generated
+3 -3
View File
@@ -12814,12 +12814,12 @@
], ],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": {}, "stability-flags": [],
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^8.3" "php": "^8.3"
}, },
"platform-dev": {}, "platform-dev": [],
"plugin-api-version": "2.9.0" "plugin-api-version": "2.6.0"
} }
@@ -19,12 +19,14 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('h3w', 7, 3)->default(0); $table->decimal('h3w', 6, 2)->default(0);
$table->decimal('d3w', 7, 3)->default(0); $table->decimal('d3w', 6, 2)->default(0);
$table->decimal('a3w', 7, 3)->default(0); $table->decimal('a3w', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,13 +19,14 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('h3w', 7, 3)->default(0); $table->decimal('h3w', 6, 2)->default(0);
$table->decimal('d3w', 7, 3)->default(0); $table->decimal('d3w', 6, 2)->default(0);
$table->decimal('a3w', 7, 3)->default(0); $table->decimal('a3w', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at'); $table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,11 +19,13 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('h2w', 7, 3)->default(0); $table->decimal('h2w', 6, 2)->default(0);
$table->decimal('a2w', 7, 3)->default(0); $table->decimal('a2w', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,11 +19,13 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('h2w', 7, 3)->default(0); $table->decimal('h2w', 6, 2)->default(0);
$table->decimal('a2w', 7, 3)->default(0); $table->decimal('a2w', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,12 +19,14 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->decimal('dc1x', 7, 3)->default(0); $table->decimal('dc1x', 6, 2)->default(0);
$table->decimal('dc12', 7, 3)->default(0); $table->decimal('dc12', 6, 2)->default(0);
$table->decimal('dcx2', 7, 3)->default(0); $table->decimal('dcx2', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,11 +19,13 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('dnb1', 7, 3)->default(0); $table->decimal('dnb1', 6, 2)->default(0);
$table->decimal('dnb2', 7, 3)->default(0); $table->decimal('dnb2', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,11 +19,13 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('gg', 7, 3)->default(0); $table->decimal('gg', 6, 2)->default(0);
$table->decimal('ng', 7, 3)->default(0); $table->decimal('ng', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,11 +19,13 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('htq', 7, 3)->default(0); $table->decimal('htq', 6, 2)->default(0);
$table->decimal('atq', 7, 3)->default(0); $table->decimal('atq', 6, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('home', 7, 3)->default(0); $table->decimal('home', 6, 2)->default(0);
$table->decimal('away', 7, 3)->default(0); $table->decimal('away', 6, 2)->default(0);
$table->decimal('handicap', 5, 2)->default(0); $table->decimal('handicap', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('home', 7, 3)->default(0); $table->decimal('home', 6, 2)->default(0);
$table->decimal('away', 7, 3)->default(0); $table->decimal('away', 6, 2)->default(0);
$table->decimal('handicap', 5, 2)->default(0); $table->decimal('handicap', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('home', 7, 3)->default(0); $table->decimal('home', 6, 2)->default(0);
$table->decimal('away', 7, 3)->default(0); $table->decimal('away', 6, 2)->default(0);
$table->decimal('handicap', 5, 2)->default(0); $table->decimal('handicap', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('over', 7, 3)->default(0); $table->decimal('over', 6, 2)->default(0);
$table->decimal('under', 7, 3)->default(0); $table->decimal('under', 6, 2)->default(0);
$table->decimal('total', 5, 2)->default(0); $table->decimal('total', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('over', 7, 3)->default(0); $table->decimal('over', 6, 2)->default(0);
$table->decimal('under', 7, 3)->default(0); $table->decimal('under', 6, 2)->default(0);
$table->decimal('total', 5, 2)->default(0); $table->decimal('total', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -19,14 +19,16 @@ return new class extends Migration
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers'); $table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
$table->bigInteger('offer_id')->default(0); $table->bigInteger('offer_id')->default(0);
$table->string('bmoid')->nullable(); $table->string('bmoid')->nullable();
$table->decimal('over', 7, 3)->default(0); $table->decimal('over', 6, 2)->default(0);
$table->decimal('under', 7, 3)->default(0); $table->decimal('under', 6, 2)->default(0);
$table->decimal('total', 5, 2)->default(0); $table->decimal('total', 5, 2)->default(0);
$table->decimal('margin', 5, 1)->default(0); $table->decimal('margin', 5, 1)->default(0);
$table->boolean('flags')->default(0); $table->boolean('flags')->default(0);
$table->decimal('difference', 5, 4)->default(0); $table->decimal('difference', 5, 4)->default(0);
$table->boolean('active_spread')->default(0); $table->boolean('active_spread')->default(0);
$table->boolean('nuh_check')->default(0); $table->boolean('nuh_check')->default(0);
$table->timestamp('oddchange_at');
$table->timestamp('checked_at');
$table->timestamps(); $table->timestamps();
}); });
} }
+15
View File
@@ -56,6 +56,20 @@ case "$1" in
php artisan nuh --d --f 12 php artisan nuh --d --f 12
php artisan nuh --d --f 16 php artisan nuh --d --f 16
;; ;;
"10")
php artisan nuh --d --t --f 1
php artisan nuh --d --t --f 2
php artisan nuh --d --t --f 3
php artisan nuh --d --f 4
php artisan nuh --d --f 5
php artisan nuh --d --f 6
php artisan nuh --d --f 8
php artisan nuh --d --f 9
php artisan nuh --d --f --p 10
php artisan nuh --d --f --p 11
php artisan nuh --d --f --p 12
php artisan nuh --d --f --p 16
;;
*) *)
echo "" echo ""
echo "--------------------------" echo "--------------------------"
@@ -70,6 +84,7 @@ case "$1" in
echo "7 => a db:seed --force" echo "7 => a db:seed --force"
echo "8 => a cache:clear view:clear" echo "8 => a cache:clear view:clear"
echo "9 => a load all data, one day, NO proxy" echo "9 => a load all data, one day, NO proxy"
echo "10 => a load all data, one day, WITH proxy"
echo "--------------------------" echo "--------------------------"
echo "" echo ""
;; ;;