txodds grapping odds - wip

This commit is contained in:
salam committed 2025-11-30 08:09:24 +01:00
1 parent 16c5608fd1
commit a597d3161b
27 files changed
+410 -15713

No files matched your search

+6 -6
View File
@@ -22,7 +22,9 @@ class Curl
}
if ($read) {
if ($debug) {
Notice::note('data read local', 'r');
}
switch (NuhBash::$options['filetype']) {
case 'xml':
return simplexml_load_file(self::$file, null, LIBXML_NOCDATA);
@@ -37,11 +39,6 @@ class Curl
Notice::note('filetype unknown', 'r', 1);
}
if ($debug) {
Notice::note('data read local', 'b');
}
}
$ch = curl_init($url);
@@ -54,7 +51,10 @@ class Curl
if ($curl_errorno) {
Notice::note('curl_errorno: '.self::curlerrorcode($curl_errorno));
}
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}
if ($save) {
Notice::note('data saved', 'b');
+36
View File
@@ -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);
}
}
@@ -11,9 +11,9 @@ use App\Models\Event;
use App\Utilities\Notice;
use Illuminate\Support\Carbon;
class FixturesSoccer
class Fixtures
{
public static function call()
public static function grap()
{
$debug = NuhBash::$options['d'] ?? 0;
$print = NuhBash::$options['p'] ?? 0;
@@ -28,7 +28,7 @@ class FixturesSoccer
$from = $date->addDays($i)->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);
if ($print) {
+239 -107
View File
@@ -2,20 +2,20 @@
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\NuhBash;
use App\Models\Event;
use App\Models\EventBookmaker;
use App\Utilities\Notice;
use App\Utilities\Supervisorctl;
use Illuminate\Support\Carbon;
use Carbon\Carbon;
class Odds
{
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
@@ -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:
$markets = '0,4,11534337,5242880,7340033';
break;
@@ -95,145 +95,277 @@ class Odds
/*************************************************
* URL
*************************************************/
$url = Grapper::$domain.'feed/odds/xml.php?'.Grapper::$auth.'&all_odds=2&spid='.Grapper::$options['sport_id'];
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.config('nuh.txodds_token_soccer').'&all_odds=2&spid='.NuhBash::$options['sport_id'].'&json=2';
$_calls = [];
if (Grapper::$options['event_id']) {
$_calls[] = $url."&ot=$markets&peid=".Grapper::$options['event_id'];
} elseif (Grapper::$options['a']) {
if (NuhBash::$options['event_id']) {
$_calls[] = $url."&ot=$markets&peid=".NuhBash::$options['event_id'];
} elseif (NuhBash::$options['a']) {
$res = Event::where('time', '>', Carbon::now()->toDateTimeString())->pluck('txid');
foreach ($res as $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');
foreach ($res as $id) {
$_calls[] = $url."&ot=$markets&peid=".$id;
}
} else {
$_calls[] = $url.'&last='.Grapper::$options['lastcall'];
$_calls[] = $url.'&last='.NuhBash::$options['lastcall'];
}
/*************************************************
* CALL
*************************************************/
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']) {
Notice::note($url);
foreach ($xml->match as $match) {
print_r($match);
}
exit;
}
$e = [];
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']) {
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;
switch ($key) {
case '@attributes':
$e['id'] = (int) $v['id'];
break;
case '1':
case 'time':
$e['time'] = $v;
break;
$value_array['f2w'] = (int) $offer['flags'] ?? 0;
$value_array['boid'] = (string) $offer['bmoid'] ?? 0;
$value_array['time'] = Carbon::parse($offer->odds['starting_time'])->toDateTimeString();
case 'group':
$e['group'] = $v['@attributes']['cname'];
$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;
$tmp = [];
$tmp['h2w'] = (float) $offer->odds->o1 ?? 1;
$tmp['a2w'] = (float) $offer->odds->o3 ?? 1;
$tmp['m2w'] = Helper::margin($tmp);
$value_array += $tmp;
case 'hteam':
$e['hoid'] = $v['@attributes']['id'];
$e['home'] = $v['@text'];
break;
case 'ateam':
$e['awid'] = $v['@attributes']['id'];
$e['away'] = $v['@text'];
break;
case 'bookmaker':
foreach ($v as $books) {
foreach ($books as $bkey => $book) {
switch ($bkey) {
case '@attributes':
$bname = $book['name'];
$bkmid = (int) $book['bid'];
$e['odds'][$bkmid]['name'] = $bname;
break;
case 'offer':
foreach ($book as $offer) {
foreach ($offer as $type => $od) {
switch ($type) {
case '@attributes':
$bettypeid = (int) $od['ot'];
$bmoid = $od['bmoid'];
break;
case 'odds':
switch ($bettypeid) {
case '0':
// three way
$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;
case '4':
$hc = (float) $offer->odds->o3;
if (Grapper::$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;
}
// totals
$e['odds_totals'][] = [
'event_id' => $e['id'],
'bookmaker_id' => $bkmid,
'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 '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;
// double chance
$e['odds_dc'][] = [
'event_id' => $e['id'],
'bookmaker_id' => $bkmid,
'matchpart_id' => 1,
'sport_id' => 1,
'bmoid' => $bmoid,
'dc1x' => (float) $od['o1'],
'dc12' => (float) $od['o2'],
'dc2x' => (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;
}
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');
// }
// }
// }
// }
}
}
}
+4 -5
View File
@@ -2,8 +2,8 @@
namespace App\Console\Commands\Grapper;
use App\Console\Commands\Grapper\TxOdds\Countries;
use App\Console\Commands\Grapper\TxOdds\FixturesSoccer;
use App\Console\Commands\Grapper\TxOdds\Fixtures;
use App\Console\Commands\Grapper\TxOdds\Odds;
use App\Console\Commands\NuhBash;
class TxSwitch
@@ -13,13 +13,12 @@ class TxSwitch
*/
public static function switch()
{
switch (NuhBash::$options['id']) {
case 1:
FixturesSoccer::call();
Fixtures::grap();
break;
case 2:
Countries::call();
Odds::grap();
break;
case 3:
break;
+1
View File
@@ -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 {
return $record->sport->icon;
}),
TextColumn::make('txodds_id')->copyable(),
TextColumn::make('starttime')->dateTime('M j, Y H:i')->sortable(),
IconColumn::make('country_id')
->label('Flag')
@@ -82,7 +82,7 @@ class AdminPanelProvider extends PanelProvider
->authMiddleware([
Authenticate::class,
])->plugins([
// FilamentShieldPlugin::make(),
FilamentShieldPlugin::make(),
FilamentEditProfilePlugin::make()->shouldRegisterNavigation(false),
LightSwitchPlugin::make()->position(Alignment::BottomCenter),
FilamentBackgroundsPlugin::make()
-12730
View File
File diff suppressed because it is too large. Load diff
-1117
View File
File diff suppressed because it is too large. Load diff
+15 -15
View File
@@ -40,7 +40,7 @@
),
'clusters' =>
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' =>
array (
@@ -58,7 +58,7 @@
),
'clusterDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Clusters',
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters',
),
'clusterNamespaces' =>
array (
@@ -66,14 +66,14 @@
),
'pages' =>
array (
'/Users/hermanntelser/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/Pages/Monitor.php' => 'App\\Filament\\Pages\\Monitor',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/MaintenanceCluster.php' => 'App\\Filament\\Clusters\\Maintenance\\MaintenanceCluster',
0 => 'Filament\\Pages\\Dashboard',
1 => 'Joaopaulolndev\\FilamentEditProfile\\Pages\\EditProfilePage',
),
'pageDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Pages',
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Pages',
),
'pageNamespaces' =>
array (
@@ -81,18 +81,18 @@
),
'resources' =>
array (
'/Users/hermanntelser/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/hermanntelser/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/hermanntelser/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/hermanntelser/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/Resources/Bookmakers/BookmakerResource.php' => 'App\\Filament\\Resources\\Bookmakers\\BookmakerResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Clients/ClientResource.php' => 'App\\Filament\\Resources\\Clients\\ClientResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Countries/CountryResource.php' => 'App\\Filament\\Resources\\Countries\\CountryResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Providers/ProviderResource.php' => 'App\\Filament\\Resources\\Providers\\ProviderResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Users/UserResource.php' => 'App\\Filament\\Resources\\Users\\UserResource',
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Clusters/Maintenance/Resources/Events/EventResource.php' => 'App\\Filament\\Clusters\\Maintenance\\Resources\\Events\\EventResource',
),
'resourceDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Resources',
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources',
),
'resourceNamespaces' =>
array (
@@ -105,7 +105,7 @@
),
'widgetDirectories' =>
array (
0 => '/Users/hermanntelser/Sites/nuhodds_fi4/app/Filament/Widgets',
0 => '/Users/salam/Sites/nuhodds_fi4/app/Filament/Widgets',
),
'widgetNamespaces' =>
array (
-1665
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -2,5 +2,6 @@
return [
'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('iso3')->nullable();
$table->string('cc')->nullable();
$table->integer('numeric')->nullable();
$table->integer('txid')->default(0);
$table->boolean('is_country')->default(0);
$table->boolean('disabled')->default(0);
@@ -18,13 +18,15 @@ return new class extends Migration
$table->integer('matchpart_id')->default(0);
$table->integer('bookmaker_id')->default(0);
$table->integer('offer_id')->default(0);
$table->decimal('home', 7, 3)->default(0);
$table->decimal('draw', 7, 3)->default(0);
$table->decimal('away', 7, 3)->default(0);
$table->decimal('margin', 7, 3)->default(0);
$table->decimal('h3w', 7, 3)->default(0);
$table->decimal('d3w', 7, 3)->default(0);
$table->decimal('a3w', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0);
$table->boolean('flag')->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->index(['event_id']);
$table->index(['sport_id']);
@@ -18,12 +18,13 @@ return new class extends Migration
$table->integer('matchpart_id')->default(0);
$table->integer('bookmaker_id')->default(0);
$table->integer('offer_id')->default(0);
$table->decimal('home', 7, 3)->default(0);
$table->decimal('away', 7, 3)->default(0);
$table->decimal('margin', 7, 3)->default(0);
$table->decimal('h2w', 7, 3)->default(0);
$table->decimal('a2w', 7, 3)->default(0);
$table->decimal('margin', 5, 1)->default(0);
$table->boolean('flag')->default(0);
$table->boolean('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -21,10 +21,11 @@ return new class extends Migration
$table->decimal('dc1x', 7, 3)->default(0);
$table->decimal('dc12', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -20,10 +20,11 @@ return new class extends Migration
$table->integer('offer_id')->default(0);
$table->decimal('dnb1', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -20,10 +20,11 @@ return new class extends Migration
$table->integer('offer_id')->default(0);
$table->decimal('gg', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -20,10 +20,11 @@ return new class extends Migration
$table->integer('offer_id')->default(0);
$table->decimal('htq', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -21,10 +21,11 @@ return new class extends Migration
$table->decimal('home', 7, 3)->default(0);
$table->decimal('away', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
@@ -21,10 +21,11 @@ return new class extends Migration
$table->decimal('over', 7, 3)->default(0);
$table->decimal('under', 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('check')->default(0);
$table->integer('add_time')->default(0);
$table->timestamp('last_check');
$table->timestamp('source_updated');
$table->timestamps();
$table->index(['event_id']);
$table->index(['sport_id']);
+22
View File
@@ -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);
}
}
+3 -1
View File
@@ -13,10 +13,12 @@ class DatabaseSeeder extends Seeder
{
$this->call([
RolesAndPermissionsSeeder::class,
OtherSeeder::class,
ProvoiderSeeder::class,
ClientsSeeder::class,
BookmakerSeeder::class,
CountrySeeder::class,
SportSeeder::class,
SupervisorSeeder::class,
]);
}
}
-41
View File
@@ -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);
}
}
+24
View File
@@ -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);
}
}
+21
View File
@@ -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);
}
}