txodds grapping odds - wip
This commit is contained in:
1 parent
16c5608fd1
commit
a597d3161b
27 files changed
+410
-15713
No files matched your search
@@ -22,7 +22,9 @@ class Curl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($read) {
|
if ($read) {
|
||||||
|
if ($debug) {
|
||||||
|
Notice::note('data read local', 'r');
|
||||||
|
}
|
||||||
switch (NuhBash::$options['filetype']) {
|
switch (NuhBash::$options['filetype']) {
|
||||||
case 'xml':
|
case 'xml':
|
||||||
return simplexml_load_file(self::$file, null, LIBXML_NOCDATA);
|
return simplexml_load_file(self::$file, null, LIBXML_NOCDATA);
|
||||||
@@ -37,11 +39,6 @@ class Curl
|
|||||||
Notice::note('filetype unknown', 'r', 1);
|
Notice::note('filetype unknown', 'r', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
|
||||||
Notice::note('data read local', 'b');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
@@ -54,7 +51,10 @@ class Curl
|
|||||||
if ($curl_errorno) {
|
if ($curl_errorno) {
|
||||||
Notice::note('curl_errorno: '.self::curlerrorcode($curl_errorno));
|
Notice::note('curl_errorno: '.self::curlerrorcode($curl_errorno));
|
||||||
}
|
}
|
||||||
curl_close($ch);
|
|
||||||
|
if (PHP_VERSION_ID < 80000) {
|
||||||
|
curl_close($ch);
|
||||||
|
}
|
||||||
|
|
||||||
if ($save) {
|
if ($save) {
|
||||||
Notice::note('data saved', 'b');
|
Notice::note('data saved', 'b');
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands\Grapper;
|
||||||
|
|
||||||
|
use App\Utilities\Notice;
|
||||||
|
|
||||||
|
class Helper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new class instance.
|
||||||
|
*/
|
||||||
|
public static function get_auth_string()
|
||||||
|
{
|
||||||
|
if (Grapper::$options['provider_id'] == 1) {
|
||||||
|
// txodds soccer
|
||||||
|
Grapper::$auth = 'ident=betaid1&passwd=Dy59vpRC';
|
||||||
|
Grapper::$domain = 'https://xml2.txodds.com/';
|
||||||
|
} elseif (Grapper::$options['provider_id'] == 3) {
|
||||||
|
// txodds others
|
||||||
|
Grapper::$auth = 'ident=betaid2&passwd=Dy59vpRC';
|
||||||
|
Grapper::$domain = 'https://xml2.txodds.com/';
|
||||||
|
} else {
|
||||||
|
Notice::note('error txodds provider', 'r', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function margin($arr, $stellen = 3)
|
||||||
|
{
|
||||||
|
$r = 0;
|
||||||
|
foreach ($arr as $value) {
|
||||||
|
$r += 100 / $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return round($r, $stellen);
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-3
@@ -11,9 +11,9 @@ use App\Models\Event;
|
|||||||
use App\Utilities\Notice;
|
use App\Utilities\Notice;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class FixturesSoccer
|
class Fixtures
|
||||||
{
|
{
|
||||||
public static function call()
|
public static function grap()
|
||||||
{
|
{
|
||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
$print = NuhBash::$options['p'] ?? 0;
|
$print = NuhBash::$options['p'] ?? 0;
|
||||||
@@ -28,7 +28,7 @@ class FixturesSoccer
|
|||||||
$from = $date->addDays($i)->toDateString();
|
$from = $date->addDays($i)->toDateString();
|
||||||
$to = $date->addDays($i + 1)->toDateString();
|
$to = $date->addDays($i + 1)->toDateString();
|
||||||
|
|
||||||
$url = 'https://xml2.txodds.com/feed/result/xml.php?ident=betaid1&passwd='.config('nuh.txodds_token')."&date=$from,$to&json=2";
|
$url = 'https://xml2.txodds.com/feed/result/xml.php?'.config('nuh.txodds_token_soccer')."&date=$from,$to&json=2";
|
||||||
$data = Curl::load($url, $debug);
|
$data = Curl::load($url, $debug);
|
||||||
|
|
||||||
if ($print) {
|
if ($print) {
|
||||||
@@ -2,20 +2,20 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands\Grapper\TxOdds;
|
namespace App\Console\Commands\Grapper\TxOdds;
|
||||||
|
|
||||||
use App\Console\Commands\Grapper\Grapper;
|
use App\Console\Commands\Curl;
|
||||||
use App\Console\Commands\Grapper\Helper;
|
use App\Console\Commands\Grapper\Helper;
|
||||||
|
use App\Console\Commands\NuhBash;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\EventBookmaker;
|
use App\Models\EventBookmaker;
|
||||||
use App\Utilities\Notice;
|
use App\Utilities\Notice;
|
||||||
use App\Utilities\Supervisorctl;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
|
|
||||||
class Odds
|
class Odds
|
||||||
{
|
{
|
||||||
public static function grap()
|
public static function grap()
|
||||||
{
|
{
|
||||||
|
|
||||||
Notice::note('txodd odd sport: '.Grapper::$options['sport_id'], 'b');
|
Notice::note('txodd odd sport: '.NuhBash::$options['sport_id'], 'b');
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* SINGLE SOCCER
|
* SINGLE SOCCER
|
||||||
@@ -67,9 +67,9 @@ class Odds
|
|||||||
|
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
$debug = Grapper::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
switch (Grapper::$options['sport_id']) {
|
switch (NuhBash::$options['sport_id']) {
|
||||||
case 1:
|
case 1:
|
||||||
$markets = '0,4,11534337,5242880,7340033';
|
$markets = '0,4,11534337,5242880,7340033';
|
||||||
break;
|
break;
|
||||||
@@ -95,145 +95,277 @@ class Odds
|
|||||||
/*************************************************
|
/*************************************************
|
||||||
* URL
|
* URL
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.config('nuh.txodds_token_soccer').'&all_odds=2&spid='.NuhBash::$options['sport_id'].'&json=2';
|
||||||
$url = Grapper::$domain.'feed/odds/xml.php?'.Grapper::$auth.'&all_odds=2&spid='.Grapper::$options['sport_id'];
|
|
||||||
$_calls = [];
|
$_calls = [];
|
||||||
if (Grapper::$options['event_id']) {
|
if (NuhBash::$options['event_id']) {
|
||||||
$_calls[] = $url."&ot=$markets&peid=".Grapper::$options['event_id'];
|
$_calls[] = $url."&ot=$markets&peid=".NuhBash::$options['event_id'];
|
||||||
} elseif (Grapper::$options['a']) {
|
} elseif (NuhBash::$options['a']) {
|
||||||
$res = Event::where('time', '>', Carbon::now()->toDateTimeString())->pluck('txid');
|
$res = Event::where('time', '>', Carbon::now()->toDateTimeString())->pluck('txid');
|
||||||
foreach ($res as $id) {
|
foreach ($res as $id) {
|
||||||
$_calls[] = $url."&ot=$markets&peid=".$id;
|
$_calls[] = $url."&ot=$markets&peid=".$id;
|
||||||
}
|
}
|
||||||
} elseif (Grapper::$options['w']) {
|
} elseif (NuhBash::$options['w']) {
|
||||||
$res = Event::where('time', '>', Carbon::now()->toDateTimeString())->where('time', '<', Carbon::now()->addDays(7)->toDateTimeString())->pluck('txid');
|
$res = Event::where('time', '>', Carbon::now()->toDateTimeString())->where('time', '<', Carbon::now()->addDays(7)->toDateTimeString())->pluck('txid');
|
||||||
foreach ($res as $id) {
|
foreach ($res as $id) {
|
||||||
$_calls[] = $url."&ot=$markets&peid=".$id;
|
$_calls[] = $url."&ot=$markets&peid=".$id;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$_calls[] = $url.'&last='.Grapper::$options['lastcall'];
|
$_calls[] = $url.'&last='.NuhBash::$options['lastcall'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* CALL
|
* CALL
|
||||||
*************************************************/
|
*************************************************/
|
||||||
foreach ($_calls as $url) {
|
foreach ($_calls as $url) {
|
||||||
Notice::note($url, 'r');
|
|
||||||
|
|
||||||
$xml = simplexml_load_file($url, null, LIBXML_NOCDATA);
|
$json_obj = Curl::load($url, $debug);
|
||||||
|
|
||||||
if (Grapper::$options['p']) {
|
$e = [];
|
||||||
Notice::note($url);
|
|
||||||
foreach ($xml->match as $match) {
|
|
||||||
print_r($match);
|
|
||||||
}
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
Supervisorctl::set_lastcall($xml['timestamp']);
|
foreach ($json_obj['match'] as $key => $v) {
|
||||||
|
|
||||||
foreach ($xml->match as $m) {
|
Notice::note($key, 'b');
|
||||||
|
|
||||||
if (Grapper::$options['d']) {
|
switch ($key) {
|
||||||
Notice::note((int) $m['id'].' : '.$m->hteam.' - '.$m->ateam);
|
case '@attributes':
|
||||||
}
|
$e['id'] = (int) $v['id'];
|
||||||
|
break;
|
||||||
|
|
||||||
$evid = Event::where('txid', (int) $m['id'])->pluck('id')->first();
|
case 'time':
|
||||||
|
$e['time'] = $v;
|
||||||
|
break;
|
||||||
|
|
||||||
if ($evid) {
|
case 'group':
|
||||||
$fixed_array = [];
|
$e['group'] = $v['@attributes']['cname'];
|
||||||
$fixed_array['event_id'] = $evid;
|
$e['gid'] = $v['@attributes']['id'];
|
||||||
|
$e['cgid'] = $v['@attributes']['cgid'];
|
||||||
|
$e['spid'] = $v['@attributes']['spid'];
|
||||||
|
$e['mgid'] = $v['@attributes']['mgid'];
|
||||||
|
$e['cnid'] = $v['@attributes']['cnid'];
|
||||||
|
break;
|
||||||
|
|
||||||
Event::where('id', $evid)->update(['cnt_bkm_tx' => count($m->bookmaker)]);
|
case 'hteam':
|
||||||
|
$e['hoid'] = $v['@attributes']['id'];
|
||||||
|
$e['home'] = $v['@text'];
|
||||||
|
break;
|
||||||
|
|
||||||
foreach ($m->bookmaker as $bookmaker) {
|
case 'ateam':
|
||||||
|
$e['awid'] = $v['@attributes']['id'];
|
||||||
|
$e['away'] = $v['@text'];
|
||||||
|
break;
|
||||||
|
|
||||||
$fixed_array['bkid'] = (int) $bookmaker['bid'];
|
case 'bookmaker':
|
||||||
|
|
||||||
$value_array = [];
|
foreach ($v as $books) {
|
||||||
|
|
||||||
foreach ($bookmaker->offer as $offer) {
|
foreach ($books as $bkey => $book) {
|
||||||
switch ($offer['ot']) {
|
|
||||||
case '0':
|
|
||||||
|
|
||||||
$value_array['f3w'] = (int) $offer['flags'] ?? 0;
|
switch ($bkey) {
|
||||||
$value_array['boid'] = (string) $offer['bmoid'] ?? 0;
|
case '@attributes':
|
||||||
$value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString();
|
$bname = $book['name'];
|
||||||
|
$bkmid = (int) $book['bid'];
|
||||||
|
$e['odds'][$bkmid]['name'] = $bname;
|
||||||
|
break;
|
||||||
|
case 'offer':
|
||||||
|
|
||||||
$tmp = [];
|
foreach ($book as $offer) {
|
||||||
$tmp['h3w'] = (float) $offer->odds->o1 ?? 1;
|
foreach ($offer as $type => $od) {
|
||||||
$tmp['d3w'] = (float) $offer->odds->o2 ?? 1;
|
|
||||||
$tmp['a3w'] = (float) $offer->odds->o3 ?? 1;
|
|
||||||
$tmp['m3w'] = Helper::margin($tmp);
|
|
||||||
$value_array += $tmp;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '1':
|
switch ($type) {
|
||||||
|
case '@attributes':
|
||||||
|
$bettypeid = (int) $od['ot'];
|
||||||
|
$bmoid = $od['bmoid'];
|
||||||
|
break;
|
||||||
|
case 'odds':
|
||||||
|
switch ($bettypeid) {
|
||||||
|
|
||||||
$value_array['f2w'] = (int) $offer['flags'] ?? 0;
|
case '0':
|
||||||
$value_array['boid'] = (string) $offer['bmoid'] ?? 0;
|
// three way
|
||||||
$value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString();
|
$e['odds_3ways'][] = [
|
||||||
|
'event_id' => $e['id'],
|
||||||
|
'bookmaker_id' => $bkmid,
|
||||||
|
'matchpart_id' => 1,
|
||||||
|
'sport_id' => 1,
|
||||||
|
'bmoid' => $bmoid,
|
||||||
|
'start' => $od['@attributes']['starting_time'],
|
||||||
|
'h3w' => (float) $od['o1'],
|
||||||
|
'd3w' => (float) $od['o2'],
|
||||||
|
'a3w' => (float) $od['o3'],
|
||||||
|
'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1),
|
||||||
|
'book_startime' => $od['@attributes']['starting_time'],
|
||||||
|
'source_updated_at' => $od['@attributes']['time'],
|
||||||
|
'nuh_last_check' => Carbon::now()->toDateTimeString(),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
$tmp = [];
|
case '4':
|
||||||
$tmp['h2w'] = (float) $offer->odds->o1 ?? 1;
|
// totals
|
||||||
$tmp['a2w'] = (float) $offer->odds->o3 ?? 1;
|
$e['odds_totals'][] = [
|
||||||
$tmp['m2w'] = Helper::margin($tmp);
|
'event_id' => $e['id'],
|
||||||
$value_array += $tmp;
|
'bookmaker_id' => $bkmid,
|
||||||
break;
|
'matchpart_id' => 1,
|
||||||
|
'sport_id' => 1,
|
||||||
|
'bmoid' => $bmoid,
|
||||||
|
'over' => (float) $od['o1'],
|
||||||
|
'under' => (float) $od['o2'],
|
||||||
|
'spread' => (float) $od['o3'],
|
||||||
|
'margin' => (float) Helper::margin([$od['o1'], $od['o2']], 1),
|
||||||
|
'flag' => 1,
|
||||||
|
'check' => 0,
|
||||||
|
'book_startime' => $od['@attributes']['starting_time'],
|
||||||
|
'source_updated_at' => $od['@attributes']['time'],
|
||||||
|
'nuh_last_check' => Carbon::now()->toDateTimeString(),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
case '4':
|
case '5242880':
|
||||||
$hc = (float) $offer->odds->o3;
|
// double chance
|
||||||
if (Grapper::$options['sport_id'] == 1 && $hc == 2.5) {
|
$e['odds_dc'][] = [
|
||||||
$tmp = [];
|
'event_id' => $e['id'],
|
||||||
$tmp['ov'] = (float) $offer->odds->o1 ?? 1;
|
'bookmaker_id' => $bkmid,
|
||||||
$tmp['un'] = (float) $offer->odds->o2 ?? 1;
|
'matchpart_id' => 1,
|
||||||
$tmp['mto'] = Helper::margin($tmp);
|
'sport_id' => 1,
|
||||||
$tmp['fto'] = (int) $offer->odd['flags'] ?? 0;
|
'bmoid' => $bmoid,
|
||||||
$tmp['hc'] = 2.5;
|
'dc1x' => (float) $od['o1'],
|
||||||
$value_array += $tmp;
|
'dc12' => (float) $od['o2'],
|
||||||
}
|
'dc2x' => (float) $od['o3'],
|
||||||
break;
|
'margin' => (float) Helper::margin([$od['o1'], $od['o2'], $od['o3']], 1),
|
||||||
|
'book_startime' => $od['@attributes']['starting_time'],
|
||||||
|
'source_updated_at' => $od['@attributes']['time'],
|
||||||
|
'nuh_last_check' => Carbon::now()->toDateTimeString(),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case '5242880':
|
break;
|
||||||
// Double Chance (dc1x,dc12,dcx2)
|
}
|
||||||
$value_array['fdc'] = (int) $offer['flags'] ?? 0;
|
}
|
||||||
$tmp = [];
|
}
|
||||||
$tmp['dc1x'] = (float) $offer->odds->o1 ?? 1;
|
break;
|
||||||
$tmp['dc12'] = (float) $offer->odds->o2 ?? 1;
|
}
|
||||||
$tmp['dcx2'] = (float) $offer->odds->o3 ?? 1;
|
|
||||||
$tmp['mdc'] = Helper::margin($tmp);
|
|
||||||
$value_array += $tmp;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '11534337':
|
|
||||||
// goal/nogoal (gg,ng)
|
|
||||||
$value_array['fgg'] = (int) $offer['flags'] ?? 0;
|
|
||||||
$tmp = [];
|
|
||||||
$tmp['gg'] = (float) $offer->odds->o1 ?? 1;
|
|
||||||
$tmp['ng'] = (float) $offer->odds->o3 ?? 1;
|
|
||||||
$tmp['mgg'] = Helper::margin($tmp);
|
|
||||||
$value_array += $tmp;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '7340033':
|
|
||||||
// to qualify (htq,atq)
|
|
||||||
$value_array['ftq'] = (int) $offer['flags'] ?? 0;
|
|
||||||
$tmp = [];
|
|
||||||
$tmp['htq'] = (float) $offer->odds->o1 ?? 1;
|
|
||||||
$tmp['atq'] = (float) $offer->odds->o3 ?? 1;
|
|
||||||
$tmp['mtq'] = Helper::margin($tmp);
|
|
||||||
$value_array += $tmp;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
EventBookmaker::updateOrCreate($fixed_array, $value_array);
|
|
||||||
if (Grapper::$options['d']) {
|
|
||||||
Notice::note($fixed_array + $value_array, 'b');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dd($e);
|
||||||
|
|
||||||
|
// if (NuhBash::$options['d']) {
|
||||||
|
// Notice::note((int) $row['id'].' : '.$row->hteam.' - '.$row->ateam, 'b', 1);
|
||||||
|
// }
|
||||||
|
// dd($data);
|
||||||
|
|
||||||
|
// if (NuhBash::$options['p']) {
|
||||||
|
// Notice::note($url);
|
||||||
|
// foreach ($xml->match as $match) {
|
||||||
|
// print_r($match);
|
||||||
|
// }
|
||||||
|
// exit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// foreach ($xml->match as $m) {
|
||||||
|
|
||||||
|
// if (NuhBash::$options['d']) {
|
||||||
|
// Notice::note((int) $m['id'].' : '.$m->hteam.' - '.$m->ateam);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $evid = Event::where('txid', (int) $m['id'])->pluck('id')->first();
|
||||||
|
|
||||||
|
// if ($evid) {
|
||||||
|
// $fixed_array = [];
|
||||||
|
// $fixed_array['event_id'] = $evid;
|
||||||
|
|
||||||
|
// Event::where('id', $evid)->update(['cnt_bkm_tx' => count($m->bookmaker)]);
|
||||||
|
|
||||||
|
// foreach ($m->bookmaker as $bookmaker) {
|
||||||
|
|
||||||
|
// $fixed_array['bkid'] = (int) $bookmaker['bid'];
|
||||||
|
|
||||||
|
// $value_array = [];
|
||||||
|
|
||||||
|
// foreach ($bookmaker->offer as $offer) {
|
||||||
|
// switch ($offer['ot']) {
|
||||||
|
// case '0':
|
||||||
|
|
||||||
|
// $value_array['f3w'] = (int) $offer['flags'] ?? 0;
|
||||||
|
// $value_array['boid'] = (string) $offer['bmoid'] ?? 0;
|
||||||
|
// $value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString();
|
||||||
|
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['h3w'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['d3w'] = (float) $offer->odds->o2 ?? 1;
|
||||||
|
// $tmp['a3w'] = (float) $offer->odds->o3 ?? 1;
|
||||||
|
// $tmp['m3w'] = Helper::margin($tmp);
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case '1':
|
||||||
|
|
||||||
|
// $value_array['f2w'] = (int) $offer['flags'] ?? 0;
|
||||||
|
// $value_array['boid'] = (string) $offer['bmoid'] ?? 0;
|
||||||
|
// $value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString();
|
||||||
|
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['h2w'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['a2w'] = (float) $offer->odds->o3 ?? 1;
|
||||||
|
// $tmp['m2w'] = Helper::margin($tmp);
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case '4':
|
||||||
|
// $hc = (float) $offer->odds->o3;
|
||||||
|
// if (NuhBash::$options['sport_id'] == 1 && $hc == 2.5) {
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['ov'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['un'] = (float) $offer->odds->o2 ?? 1;
|
||||||
|
// $tmp['mto'] = Helper::margin($tmp);
|
||||||
|
// $tmp['fto'] = (int) $offer->odd['flags'] ?? 0;
|
||||||
|
// $tmp['hc'] = 2.5;
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case '5242880':
|
||||||
|
// // Double Chance (dc1x,dc12,dcx2)
|
||||||
|
// $value_array['fdc'] = (int) $offer['flags'] ?? 0;
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['dc1x'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['dc12'] = (float) $offer->odds->o2 ?? 1;
|
||||||
|
// $tmp['dcx2'] = (float) $offer->odds->o3 ?? 1;
|
||||||
|
// $tmp['mdc'] = Helper::margin($tmp);
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case '11534337':
|
||||||
|
// // goal/nogoal (gg,ng)
|
||||||
|
// $value_array['fgg'] = (int) $offer['flags'] ?? 0;
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['gg'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['ng'] = (float) $offer->odds->o3 ?? 1;
|
||||||
|
// $tmp['mgg'] = Helper::margin($tmp);
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case '7340033':
|
||||||
|
// // to qualify (htq,atq)
|
||||||
|
// $value_array['ftq'] = (int) $offer['flags'] ?? 0;
|
||||||
|
// $tmp = [];
|
||||||
|
// $tmp['htq'] = (float) $offer->odds->o1 ?? 1;
|
||||||
|
// $tmp['atq'] = (float) $offer->odds->o3 ?? 1;
|
||||||
|
// $tmp['mtq'] = Helper::margin($tmp);
|
||||||
|
// $value_array += $tmp;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// EventBookmaker::updateOrCreate($fixed_array, $value_array);
|
||||||
|
// if (NuhBash::$options['d']) {
|
||||||
|
// Notice::note($fixed_array + $value_array, 'b');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands\Grapper;
|
namespace App\Console\Commands\Grapper;
|
||||||
|
|
||||||
use App\Console\Commands\Grapper\TxOdds\Countries;
|
use App\Console\Commands\Grapper\TxOdds\Fixtures;
|
||||||
use App\Console\Commands\Grapper\TxOdds\FixturesSoccer;
|
use App\Console\Commands\Grapper\TxOdds\Odds;
|
||||||
use App\Console\Commands\NuhBash;
|
use App\Console\Commands\NuhBash;
|
||||||
|
|
||||||
class TxSwitch
|
class TxSwitch
|
||||||
@@ -13,13 +13,12 @@ class TxSwitch
|
|||||||
*/
|
*/
|
||||||
public static function switch()
|
public static function switch()
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (NuhBash::$options['id']) {
|
switch (NuhBash::$options['id']) {
|
||||||
case 1:
|
case 1:
|
||||||
FixturesSoccer::call();
|
Fixtures::grap();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Countries::call();
|
Odds::grap();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{"@attributes":{"time":"2025-11-30T05:12:00+00:00","timestamp":"1764479520"},"match":{"@attributes":{"id":"13425457","xsid":"0","gsmid":"0"},"time":"2025-11-29T05:00:00+00:00","group":{"@attributes":{"id":"172158","cgid":"110","spid":"1","cnid":"416","mgid":"1031","cname":"J2 League"},"@text":"FBJPN J2 League-25"},"hteam":{"@attributes":{"id":"42598"},"@text":"Renofa Yamaguchi"},"ateam":{"@attributes":{"id":"6519"},"@text":"Omiya Ardija"},"results":null,"bookmaker":[{"@attributes":{"bid":"42","name":"William Hill"},"offer":[{"@attributes":{"id":"4093976728","n":"2","ot":"5242880","otname":"double chance (1x\/x2\/12)","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T03:55:11+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.620","o2":"1.350","o3":"1.330"}},{"@attributes":{"id":"4093976730","n":"1","ot":"4","otname":"totals","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-24T02:16:13+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.050","o2":"10.000","o3":"0.50"}},{"@attributes":{"id":"4093976740","n":"7","ot":"0","otname":"three way","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:47:14+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"3.000","o2":"3.100","o3":"2.150"}},{"@attributes":{"id":"4093976746","n":"2","ot":"4","otname":"totals","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-28T05:04:25+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.910","o2":"1.800","o3":"2.50"}},{"@attributes":{"id":"4093976751","n":"3","ot":"4","otname":"totals","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:52:23+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.250","o2":"3.500","o3":"1.50"}},{"@attributes":{"id":"4093976754","n":"3","ot":"4","otname":"totals","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T02:02:19+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"3.100","o2":"1.300","o3":"3.50"}},{"@attributes":{"id":"4093976781","n":"1","ot":"11534337","otname":"both teams to score","last_updated":"2025-11-29T04:57:49+00:00","flags":"0","bmoid":"37808110"},"odds":{"@attributes":{"i":"0","time":"2025-11-24T02:16:13+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.670","o2":"0.000","o3":"2.100"}}]},{"@attributes":{"bid":"327","name":"Sbobet.com"},"offer":[{"@attributes":{"id":"4094133178","n":"44","ot":"4","otname":"totals","last_updated":"2025-11-29T05:02:04+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:58:47+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.930","o2":"1.970","o3":"2.50"}},{"@attributes":{"id":"4094249885","n":"52","ot":"0","otname":"three way","last_updated":"2025-11-29T05:02:04+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:58:47+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"3.190","o2":"3.290","o3":"2.250"}},{"@attributes":{"id":"4094250268","n":"44","ot":"5242880","otname":"double chance (1x\/x2\/12)","last_updated":"2025-11-29T05:02:04+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:58:47+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.690","o2":"1.320","o3":"1.300"}},{"@attributes":{"id":"4096814952","n":"10","ot":"4","otname":"totals","last_updated":"2025-11-29T05:02:04+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:58:47+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"2.200","o2":"1.730","o3":"2.75"}},{"@attributes":{"id":"4097533283","n":"2","ot":"4","otname":"totals","last_updated":"2025-11-29T05:02:04+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:58:47+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.670","o2":"2.290","o3":"2.25"}}]},{"@attributes":{"bid":"30","name":"Bwin"},"offer":[{"@attributes":{"id":"4094637420","n":"3","ot":"5242880","otname":"double chance (1x\/x2\/12)","last_updated":"2025-11-29T05:00:09+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:10:54+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"1.610","o2":"1.350","o3":"1.310"}},{"@attributes":{"id":"4094637422","n":"3","ot":"0","otname":"three way","last_updated":"2025-11-29T05:00:09+00:00","flags":"0","bmoid":"0"},"odds":{"@attributes":{"i":"0","time":"2025-11-29T04:10:54+00:00","starting_time":"2025-11-29T05:00:00+00:00"},"o1":"2.950","o2":"3.100","o3":"2.150"}},{"@attributes":{"id":"4094637424","n":"2","ot":"4","otname":"totals","last_updated":"2025-11-29T05:00:09+00:00","flags":"0","bmoid":"0"},"odds":{"@attributeLine truncated
|
||||||
@@ -21,6 +21,8 @@ class EventsTable
|
|||||||
->icon(function ($record): string {
|
->icon(function ($record): string {
|
||||||
return $record->sport->icon;
|
return $record->sport->icon;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
TextColumn::make('txodds_id')->copyable(),
|
||||||
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
|
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
|
||||||
IconColumn::make('country_id')
|
IconColumn::make('country_id')
|
||||||
->label('Flag')
|
->label('Flag')
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class AdminPanelProvider extends PanelProvider
|
|||||||
->authMiddleware([
|
->authMiddleware([
|
||||||
Authenticate::class,
|
Authenticate::class,
|
||||||
])->plugins([
|
])->plugins([
|
||||||
// FilamentShieldPlugin::make(),
|
FilamentShieldPlugin::make(),
|
||||||
FilamentEditProfilePlugin::make()->shouldRegisterNavigation(false),
|
FilamentEditProfilePlugin::make()->shouldRegisterNavigation(false),
|
||||||
LightSwitchPlugin::make()->position(Alignment::BottomCenter),
|
LightSwitchPlugin::make()->position(Alignment::BottomCenter),
|
||||||
FilamentBackgroundsPlugin::make()
|
FilamentBackgroundsPlugin::make()
|
||||||
|
|||||||
Vendored
-12730
File diff suppressed because it is too large.
Load diff
Vendored
-1117
File diff suppressed because it is too large.
Load diff
+15
-15
@@ -40,7 +40,7 @@
|
|||||||
),
|
),
|
||||||
'clusters' =>
|
'clusters' =>
|
||||||
array (
|
array (
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/MaintenanceCluster.php' => 'App\\Filament\\Clusters\\Maintenance\\MaintenanceCluster',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/MaintenanceCluster.php' => 'App\\Filament\\Clusters\\Maintenance\\MaintenanceCluster',
|
||||||
),
|
),
|
||||||
'clusteredComponents' =>
|
'clusteredComponents' =>
|
||||||
array (
|
array (
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
),
|
),
|
||||||
'clusterDirectories' =>
|
'clusterDirectories' =>
|
||||||
array (
|
array (
|
||||||
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Clusters',
|
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters',
|
||||||
),
|
),
|
||||||
'clusterNamespaces' =>
|
'clusterNamespaces' =>
|
||||||
array (
|
array (
|
||||||
@@ -66,14 +66,14 @@
|
|||||||
),
|
),
|
||||||
'pages' =>
|
'pages' =>
|
||||||
array (
|
array (
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Pages/Monitor.php' => 'App\\Filament\\Pages\\Monitor',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Pages/Monitor.php' => 'App\\Filament\\Pages\\Monitor',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/MaintenanceCluster.php' => 'App\\Filament\\Clusters\\Maintenance\\MaintenanceCluster',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/MaintenanceCluster.php' => 'App\\Filament\\Clusters\\Maintenance\\MaintenanceCluster',
|
||||||
0 => 'Filament\\Pages\\Dashboard',
|
0 => 'Filament\\Pages\\Dashboard',
|
||||||
1 => 'Joaopaulolndev\\FilamentEditProfile\\Pages\\EditProfilePage',
|
1 => 'Joaopaulolndev\\FilamentEditProfile\\Pages\\EditProfilePage',
|
||||||
),
|
),
|
||||||
'pageDirectories' =>
|
'pageDirectories' =>
|
||||||
array (
|
array (
|
||||||
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Pages',
|
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Pages',
|
||||||
),
|
),
|
||||||
'pageNamespaces' =>
|
'pageNamespaces' =>
|
||||||
array (
|
array (
|
||||||
@@ -81,18 +81,18 @@
|
|||||||
),
|
),
|
||||||
'resources' =>
|
'resources' =>
|
||||||
array (
|
array (
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Bookmakers/BookmakerResource.php' => 'App\\Filament\\Resources\\Bookmakers\\BookmakerResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Bookmakers/BookmakerResource.php' => 'App\\Filament\\Resources\\Bookmakers\\BookmakerResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Clients/ClientResource.php' => 'App\\Filament\\Resources\\Clients\\ClientResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Clients/ClientResource.php' => 'App\\Filament\\Resources\\Clients\\ClientResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Countries/CountryResource.php' => 'App\\Filament\\Resources\\Countries\\CountryResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Countries/CountryResource.php' => 'App\\Filament\\Resources\\Countries\\CountryResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Providers/ProviderResource.php' => 'App\\Filament\\Resources\\Providers\\ProviderResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Providers/ProviderResource.php' => 'App\\Filament\\Resources\\Providers\\ProviderResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource',
|
||||||
'/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/Resources/Events/EventResource.php' => 'App\\Filament\\Clusters\\Maintenance\\Resources\\Events\\EventResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/Resources/Events/EventResource.php' => 'App\\Filament\\Clusters\\Maintenance\\Resources\\Events\\EventResource',
|
||||||
),
|
),
|
||||||
'resourceDirectories' =>
|
'resourceDirectories' =>
|
||||||
array (
|
array (
|
||||||
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources',
|
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources',
|
||||||
),
|
),
|
||||||
'resourceNamespaces' =>
|
'resourceNamespaces' =>
|
||||||
array (
|
array (
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
),
|
),
|
||||||
'widgetDirectories' =>
|
'widgetDirectories' =>
|
||||||
array (
|
array (
|
||||||
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Widgets',
|
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Widgets',
|
||||||
),
|
),
|
||||||
'widgetNamespaces' =>
|
'widgetNamespaces' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
Vendored
-1665
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -2,5 +2,6 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'betsapi_token' => env('BETSAPI_TOKEN', 'var missing in env'),
|
'betsapi_token' => env('BETSAPI_TOKEN', 'var missing in env'),
|
||||||
'txodds_token' => env('TXODDS_TOKEN', 'var missing in env'),
|
'txodds_token_soccer' => env('TXODDS_TOKEN_SOCCER', 'txodds_token_soccer var missing in env'),
|
||||||
|
'txodds_token_other' => env('TXODDS_TOKEN_OTHER', 'txodds_token_other var missing in env'),
|
||||||
];
|
];
|
||||||
@@ -18,6 +18,7 @@ return new class extends Migration
|
|||||||
$table->string('iso2')->nullable();
|
$table->string('iso2')->nullable();
|
||||||
$table->string('iso3')->nullable();
|
$table->string('iso3')->nullable();
|
||||||
$table->string('cc')->nullable();
|
$table->string('cc')->nullable();
|
||||||
|
$table->integer('numeric')->nullable();
|
||||||
$table->integer('txid')->default(0);
|
$table->integer('txid')->default(0);
|
||||||
$table->boolean('is_country')->default(0);
|
$table->boolean('is_country')->default(0);
|
||||||
$table->boolean('disabled')->default(0);
|
$table->boolean('disabled')->default(0);
|
||||||
|
|||||||
@@ -18,13 +18,15 @@ return new class extends Migration
|
|||||||
$table->integer('matchpart_id')->default(0);
|
$table->integer('matchpart_id')->default(0);
|
||||||
$table->integer('bookmaker_id')->default(0);
|
$table->integer('bookmaker_id')->default(0);
|
||||||
$table->integer('offer_id')->default(0);
|
$table->integer('offer_id')->default(0);
|
||||||
$table->decimal('home', 7, 3)->default(0);
|
$table->decimal('h3w', 7, 3)->default(0);
|
||||||
$table->decimal('draw', 7, 3)->default(0);
|
$table->decimal('d3w', 7, 3)->default(0);
|
||||||
$table->decimal('away', 7, 3)->default(0);
|
$table->decimal('a3w', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('book_startime');
|
||||||
|
$table->timestamp('nuh_last_check');
|
||||||
|
$table->timestamp('source_updated_at');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ return new class extends Migration
|
|||||||
$table->integer('matchpart_id')->default(0);
|
$table->integer('matchpart_id')->default(0);
|
||||||
$table->integer('bookmaker_id')->default(0);
|
$table->integer('bookmaker_id')->default(0);
|
||||||
$table->integer('offer_id')->default(0);
|
$table->integer('offer_id')->default(0);
|
||||||
$table->decimal('home', 7, 3)->default(0);
|
$table->decimal('h2w', 7, 3)->default(0);
|
||||||
$table->decimal('away', 7, 3)->default(0);
|
$table->decimal('a2w', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ return new class extends Migration
|
|||||||
$table->decimal('dc1x', 7, 3)->default(0);
|
$table->decimal('dc1x', 7, 3)->default(0);
|
||||||
$table->decimal('dc12', 7, 3)->default(0);
|
$table->decimal('dc12', 7, 3)->default(0);
|
||||||
$table->decimal('dc2x', 7, 3)->default(0);
|
$table->decimal('dc2x', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ return new class extends Migration
|
|||||||
$table->integer('offer_id')->default(0);
|
$table->integer('offer_id')->default(0);
|
||||||
$table->decimal('dnb1', 7, 3)->default(0);
|
$table->decimal('dnb1', 7, 3)->default(0);
|
||||||
$table->decimal('dnb2', 7, 3)->default(0);
|
$table->decimal('dnb2', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ return new class extends Migration
|
|||||||
$table->integer('offer_id')->default(0);
|
$table->integer('offer_id')->default(0);
|
||||||
$table->decimal('gg', 7, 3)->default(0);
|
$table->decimal('gg', 7, 3)->default(0);
|
||||||
$table->decimal('ng', 7, 3)->default(0);
|
$table->decimal('ng', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ return new class extends Migration
|
|||||||
$table->integer('offer_id')->default(0);
|
$table->integer('offer_id')->default(0);
|
||||||
$table->decimal('htq', 7, 3)->default(0);
|
$table->decimal('htq', 7, 3)->default(0);
|
||||||
$table->decimal('atq', 7, 3)->default(0);
|
$table->decimal('atq', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ return new class extends Migration
|
|||||||
$table->decimal('home', 7, 3)->default(0);
|
$table->decimal('home', 7, 3)->default(0);
|
||||||
$table->decimal('away', 7, 3)->default(0);
|
$table->decimal('away', 7, 3)->default(0);
|
||||||
$table->decimal('handicap', 7, 3)->default(0);
|
$table->decimal('handicap', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ return new class extends Migration
|
|||||||
$table->decimal('over', 7, 3)->default(0);
|
$table->decimal('over', 7, 3)->default(0);
|
||||||
$table->decimal('under', 7, 3)->default(0);
|
$table->decimal('under', 7, 3)->default(0);
|
||||||
$table->decimal('total', 7, 3)->default(0);
|
$table->decimal('total', 7, 3)->default(0);
|
||||||
$table->decimal('margin', 7, 3)->default(0);
|
$table->decimal('margin', 5, 1)->default(0);
|
||||||
$table->boolean('flag')->default(0);
|
$table->boolean('flag')->default(0);
|
||||||
$table->boolean('check')->default(0);
|
$table->boolean('check')->default(0);
|
||||||
$table->integer('add_time')->default(0);
|
$table->timestamp('last_check');
|
||||||
|
$table->timestamp('source_updated');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index(['event_id']);
|
$table->index(['event_id']);
|
||||||
$table->index(['sport_id']);
|
$table->index(['sport_id']);
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class ClientsSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Clients
|
||||||
|
*/
|
||||||
|
$sql = "INSERT INTO `clients` (`id`, `name`, `homepage`, `bookmaker`, `sport`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
('1', 'Magloo', NULL, '[\"20\",\"24\"]', '[\"1\",\"3\"]', '2025-08-24 05:56:41', '2025-08-24 05:56:41'),
|
||||||
|
('2', 'Logifuture', NULL, '[\"26\",\"27\"]', '[\"1\",\"2\",\"3\",\"5\"]', '2025-08-24 05:57:01', '2025-08-24 05:57:01');";
|
||||||
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,10 +13,12 @@ class DatabaseSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
$this->call([
|
$this->call([
|
||||||
RolesAndPermissionsSeeder::class,
|
RolesAndPermissionsSeeder::class,
|
||||||
OtherSeeder::class,
|
ProvoiderSeeder::class,
|
||||||
|
ClientsSeeder::class,
|
||||||
BookmakerSeeder::class,
|
BookmakerSeeder::class,
|
||||||
CountrySeeder::class,
|
CountrySeeder::class,
|
||||||
SportSeeder::class,
|
SportSeeder::class,
|
||||||
|
SupervisorSeeder::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
|
|
||||||
class OtherSeeder extends Seeder
|
|
||||||
{
|
|
||||||
public function run(): void
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Provoider
|
|
||||||
*/
|
|
||||||
$sql = "INSERT INTO `providers` (`id`, `name`)
|
|
||||||
VALUES
|
|
||||||
('1', 'TxOdds'),
|
|
||||||
('2', 'BetsApi'),
|
|
||||||
('3', 'Direct');
|
|
||||||
";
|
|
||||||
DB::unprepared($sql);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clients
|
|
||||||
*/
|
|
||||||
$sql = "INSERT INTO `clients` (`id`, `name`, `homepage`, `bookmaker`, `sport`, `created_at`, `updated_at`)
|
|
||||||
VALUES
|
|
||||||
('1', 'Magloo', NULL, '[\"20\",\"24\"]', '[\"1\",\"3\"]', '2025-08-24 05:56:41', '2025-08-24 05:56:41'),
|
|
||||||
('2', 'Logifuture', NULL, '[\"26\",\"27\"]', '[\"1\",\"2\",\"3\",\"5\"]', '2025-08-24 05:57:01', '2025-08-24 05:57:01');";
|
|
||||||
DB::unprepared($sql);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Supervisor
|
|
||||||
*/
|
|
||||||
$sql = "INSERT INTO `supervisors` (`id`, `name`, `type`, `provider_id`, `sport_id`, `bookmaker_id`, `sleep`, `limit`, `runtime`, `events`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`)
|
|
||||||
VALUES
|
|
||||||
('1', 'Fixtures Soccer', 'Grapper', '1', '1', NULL, '10', '0', NULL, '0', '0', '1', '0', '2025-08-27 07:39:55', '2025-08-27 07:39:55');";
|
|
||||||
DB::unprepared($sql);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class ProvoiderSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Provoider
|
||||||
|
*/
|
||||||
|
$sql = "INSERT INTO `providers` (`id`, `name`)
|
||||||
|
VALUES
|
||||||
|
('1', 'TxOdds'),
|
||||||
|
('2', 'BetsApi'),
|
||||||
|
('3', 'Direct');
|
||||||
|
";
|
||||||
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class SupervisorSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Supervisor
|
||||||
|
*/
|
||||||
|
$sql = "INSERT INTO `supervisors` (`id`, `name`, `type`, `provider_id`, `sport_id`, `bookmaker_id`, `sleep`, `limit`, `runtime`, `events`, `lastcall`, `is_cron`, `is_active`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
('1', 'Fixtures Soccer', 'Grapper', '1', '1', NULL, '10', '0', NULL, '0', '0', '1', '0', '2025-08-27 07:39:55', '2025-08-27 07:39:55');";
|
||||||
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user