From a96abae35aa6410af64d49a644c420a5811d07f9 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 5 Jan 2026 07:38:28 +0100 Subject: [PATCH] logifurture wip --- app/Console/Commands/Curl.php | 13 +- app/Console/Commands/Grapper/Logifuture.php | 49 + .../Commands/Grapper/Logifuture/Auth.php | 41 + .../Commands/Grapper/Logifuture/BaseUrl.php | 33 + .../Commands/Grapper/Logifuture/Fixtures.php | 110 + .../Commands/Grapper/Logifuture/Odds.php | 205 ++ .../Commands/Grapper/TxOdds/Fixtures.php | 3 + app/Console/Commands/Grapper/TxOdds/Odds.php | 10 +- app/Console/Commands/Nuh.php | 18 +- app/Console/Commands/TestFiles/fixtures.xml | 3141 +++++++++-------- app/Mapper/LoadEvents.php | 16 +- app/Mapper/LoadProvider.php | 6 +- app/Utilities/Supervisorctl.php | 4 +- .../2023_05_25_112700_create_events_table.php | 2 +- database/seeders/SupervisorSeeder.php | 10 +- 15 files changed, 2143 insertions(+), 1518 deletions(-) create mode 100644 app/Console/Commands/Grapper/Logifuture.php create mode 100644 app/Console/Commands/Grapper/Logifuture/Auth.php create mode 100644 app/Console/Commands/Grapper/Logifuture/BaseUrl.php create mode 100644 app/Console/Commands/Grapper/Logifuture/Fixtures.php create mode 100644 app/Console/Commands/Grapper/Logifuture/Odds.php diff --git a/app/Console/Commands/Curl.php b/app/Console/Commands/Curl.php index a07f63aa..5d1068a0 100644 --- a/app/Console/Commands/Curl.php +++ b/app/Console/Commands/Curl.php @@ -8,7 +8,7 @@ class Curl { public static $testfiles = '/Console/Commands/TestFiles/'; - public static function load($url) + public static function load($url, $_config = []) { $debug = Nuh::$options['d'] ?? 0; $save = Nuh::$options['s'] ?? 0; @@ -30,6 +30,17 @@ class Curl return json_decode($file, true); } + // POST + if (isset($_config['post'])) { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($_config['post'])); + } + + // JSON + if (isset($_config['header'])) { + curl_setopt($ch, CURLOPT_HTTPHEADER, $_config['header']); + } + if ($proxy) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, Nuh::$options['proxy']); diff --git a/app/Console/Commands/Grapper/Logifuture.php b/app/Console/Commands/Grapper/Logifuture.php new file mode 100644 index 00000000..bd2d8082 --- /dev/null +++ b/app/Console/Commands/Grapper/Logifuture.php @@ -0,0 +1,49 @@ + $sportid) { + + $url = $base_url.'/v1/matches?sportId='.$client_sportid; + + $data = Loader::curlLoader($url, ['curl_options' => $header]); + + dd($data); + } + + } +} diff --git a/app/Console/Commands/Grapper/Logifuture/Auth.php b/app/Console/Commands/Grapper/Logifuture/Auth.php new file mode 100644 index 00000000..0b03cb1a --- /dev/null +++ b/app/Console/Commands/Grapper/Logifuture/Auth.php @@ -0,0 +1,41 @@ + [ + 'accept: application/json', + 'content-type: application/json', + ], + 'post' => [ + 'username' => 'nuhodds', + 'password' => self::$pass, + ], + ]); + + if (! is_array($data)) { + + Notice::note('no data sleep(60)', 'r'); + sleep(60); + + return false; + } + + $header = $data; + $header[] = 'Authorization: Bearer '.$data['token']; + $header[] = 'accept: application/json'; + $header[] = 'content-type: application/json'; + + return $header; + } +} diff --git a/app/Console/Commands/Grapper/Logifuture/BaseUrl.php b/app/Console/Commands/Grapper/Logifuture/BaseUrl.php new file mode 100644 index 00000000..dd7b00d6 --- /dev/null +++ b/app/Console/Commands/Grapper/Logifuture/BaseUrl.php @@ -0,0 +1,33 @@ + $val1) { + $tmp['country_id'] = $val1['i']; + $tmp['country'] = $val1['n']; + foreach ($val1['T'] as $key => $val2) { + $tmp['group_id'] = $val2['i']; + $tmp['group'] = $val2['n']; + $ligas[] = $tmp; + } + } + } + } + + foreach ($ligas as $liga) { + if ($liga['group'] && strpos($liga['group'], 'Simulated') === false) { + + $sport_id = $liga['sport_id']; + + $url = $base_url.'/tournament/'.$liga['group_id'].'/event'; + + $data = Curl::load($url); + + foreach ($data as $magloo) { + + // print_r($magloo); + + $event = []; + $event['event_id'] = (int) $magloo['i']; + $event['betradar_id'] = (int) preg_replace('/\D/', '', $magloo['p']); + $event['sport_id'] = $sport_id; + $event['provider_id'] = Nuh::$options['provider_id']; + $event['starttime'] = strtotime($magloo['dt']); + $event['country_id'] = $liga['country_id']; + $event['country'] = $liga['country']; + $event['group_id'] = $liga['group_id']; + $event['group'] = $liga['group']; + $event['starttime'] = Carbon::parse($magloo['dt'])->toDateTimeString(); + $teams = explode(' v ', str_replace('|', ' ', $magloo['n'])); + $event['home_id'] = $magloo['htId']; + $event['home'] = addslashes($teams[0]); + $event['away_id'] = $magloo['atId']; + $event['away'] = addslashes($teams[1]); + + FindFixture::search($event, self::$groups[$sport_id], self::$elements[$sport_id]); + } + } + } + } +} diff --git a/app/Console/Commands/Grapper/Logifuture/Odds.php b/app/Console/Commands/Grapper/Logifuture/Odds.php new file mode 100644 index 00000000..8a838317 --- /dev/null +++ b/app/Console/Commands/Grapper/Logifuture/Odds.php @@ -0,0 +1,205 @@ + $sport_id) { + $url = $base_url.$magloo_sport_id.'/odds'; + + $data = Curl::load($url); + if (! is_array($data) or \count($data) == 0) { + Notice::note('no data in feed', 'r', 1); + + return; + } + + foreach ($data as $match) { + + $betradar_id = (int) preg_replace('/\D/', '', $match['p']); + + $starttime = Carbon::parse($match['dt'])->toDateTimeString(); + + $event_id = Event::where('betradar_id', $betradar_id)->value('id'); + + if ($event_id) { + $base = []; + $base['sport_id'] = $sport_id; + $base['provider_id'] = Nuh::$options['provider_id']; + $base['bmoid'] = preg_replace('/\D/', '', $match['i']); + $base['flag'] = 1; + + $event_id_collector[] = $event_id; + + EventBookmaker::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], ['in_feed' => 1, 'bmoid' => $base['bmoid']]); + + foreach ($match['M'] as $magloo_bettype_id => $value) { + switch ($magloo_bettype_id) { + case 1: + // 1x2 + $odds = []; + $odds['h3w'] = $value['static'][1] ?? 1; + $odds['d3w'] = $value['static'][2] ?? 1; + $odds['a3w'] = $value['static'][3] ?? 1; + $odds['margin'] = (float) Margin::calculate($odds, 1); + $odds['starttime'] = $starttime; + + Odds3way::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + + break; + case 2: + // to qalify + $odds = []; + $odds['htq'] = $value['static'][4] ?? 1; + $odds['atq'] = $value['static'][5] ?? 1; + $odds['margin'] = (float) Margin::calculate($odds, 1); + + OddsTq::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + + break; + + case 10: + // double chance + $odds = []; + $odds['dc1x'] = $value['static'][9] ?? 1; + $odds['dc12'] = $value['static'][10] ?? 1; + $odds['dcx2'] = $value['static'][11] ?? 1; + $odds['margin'] = (float) Margin::calculate($odds, 1); + + OddsDc::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + + break; + + case 10: + // ggng + $odds = []; + $odds['gg'] = $value['static'][74] ?? 1; + $odds['ng'] = $value['static'][76] ?? 1; + $odds['margin'] = (float) Margin::calculate($odds, 1); + + OddsDc::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + + break; + + case 16: + // points + $odds = FilterHandicap::get($value); + $odds['starttime'] = $starttime; + + OddsHandicap::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + break; + + case 2000: + // points qt + $odds = FilterHandicap::get($value); + OddsHandicap::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + break; + + case 2025: + // points qt + $odds = FilterHandicapQ1::get($value); + OddsHandicapQ1::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + break; + case 17: + case 2002: + // totals + $odds = FilterTotals::get($value, $sport_id); + OddsTotal::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + break; + case 2012: + // totals qt + $odds = FilterTotalsQ1::get($value, $sport_id); + OddsTotalQ1::updateOrCreate([ + 'event_id' => $event_id, + 'bookmaker_id' => $bookmaker_id, + ], $base + $odds); + break; + } + } + } + } + } + + EventBookmaker::whereNotIn('event_id', $event_id_collector) + ->where('bookmaker_id', $bookmaker_id) + ->update(['in_feed' => 0]); + + } +} diff --git a/app/Console/Commands/Grapper/TxOdds/Fixtures.php b/app/Console/Commands/Grapper/TxOdds/Fixtures.php index baf19f19..908a82a7 100644 --- a/app/Console/Commands/Grapper/TxOdds/Fixtures.php +++ b/app/Console/Commands/Grapper/TxOdds/Fixtures.php @@ -49,6 +49,9 @@ class Fixtures } foreach ($data as $row) { + + dd($row); + $event = [ 'provider_id' => (int) Nuh::$options['provider_id'], 'starttime' => Carbon::createFromDate((string) $row->time)->toDateTimeString(), diff --git a/app/Console/Commands/Grapper/TxOdds/Odds.php b/app/Console/Commands/Grapper/TxOdds/Odds.php index 0e3fd687..5ef49675 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds.php @@ -127,6 +127,12 @@ class Odds foreach ($res as $id) { $_calls[] = $url."&ot=$markets&peid=".$id; } + } elseif (Nuh::$options['g']) { + // by groups + $res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->groupBy('group_id')->pluck('group_id'); + foreach ($res as $id) { + $_calls[] = $url."&ot=$markets&pgid=".$id; + } } elseif (Nuh::$options['b']) { // one day $res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id'); @@ -150,6 +156,8 @@ class Odds $counter = 0; foreach ($_calls as $url) { + $counter++; + $data = Xml::load($url); if ($echo) { @@ -203,8 +211,6 @@ class Odds ]; Element::updateOrCreate(['id' => (int) $row->ateam['id']], $element); - $counter++; - foreach ($row->bookmaker as $book) { Nuh::$id = (int) $row['id']; diff --git a/app/Console/Commands/Nuh.php b/app/Console/Commands/Nuh.php index 0fa8b9f0..c9d4d2d9 100644 --- a/app/Console/Commands/Nuh.php +++ b/app/Console/Commands/Nuh.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use App\Console\Commands\Grapper\Betsapi; +use App\Console\Commands\Grapper\Logifuture; use App\Console\Commands\Grapper\Magloo; use App\Console\Commands\Grapper\TxOdds; use App\Models\Supervisor; @@ -23,7 +24,7 @@ class Nuh extends Command public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe'; - protected $signature = 'nuh {process=help} {eventid=0} {--d} {--f} {--a} {--w} {--p} {--e} {--s} {--r} {--b} {--q} {--t}'; + protected $signature = 'nuh {process=help} {eventid=0} {--d} {--f} {--a} {--w} {--p} {--e} {--s} {--r} {--b} {--q} {--t} {--g}'; protected $description = 'Nuh'; @@ -45,7 +46,9 @@ class Nuh extends Command $txt .= 'List of options'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL; $txt .= '--a reload all'.PHP_EOL; - $txt .= '--b break loop after one '.PHP_EOL; + $txt .= '--b load one day single '.PHP_EOL; + $txt .= '--w laod one week (tx)'.PHP_EOL; + $txt .= '--g by minor groups (tx)'.PHP_EOL; $txt .= '--d debug'.PHP_EOL; $txt .= '--e echo file'.PHP_EOL; @@ -57,14 +60,17 @@ class Nuh extends Command $txt .= '--s store data to file '.PHP_EOL; $txt .= '--t test server url '.PHP_EOL; - $txt .= '--w reload one week (tx)'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL; $txt .= 'List of supervisors'.PHP_EOL; $txt .= '----------------------------------------------'.PHP_EOL; - $tmp = Supervisor::all(); + $tmp = Supervisor::orderBy('provider_id')->get(); foreach ($tmp as $value) { - $txt .= sprintf('% 3d', $value->id).' '.$value->provider->name.' - '.$value->type.' '.$value->name.PHP_EOL; + if ($value->sport_id) { + $txt .= sprintf('% 3d', $value->id).' '.$value->provider->name.' - '.$value->sport->name.' '.$value->name.PHP_EOL; + } else { + $txt .= sprintf('% 3d', $value->id).' '.$value->provider->name.' - All '.$value->name.PHP_EOL; + } } Notice::note($txt, 'b', 1); } @@ -96,9 +102,11 @@ class Nuh extends Command break; case 5: // LOGIFUTUR NIGERA + Logifuture::switch(); break; case 6: // LOGIFUTUR COLOMBIA + Logifuture::switch(); break; default: Notice::note('Provider not defined', 'r', 1); diff --git a/app/Console/Commands/TestFiles/fixtures.xml b/app/Console/Commands/TestFiles/fixtures.xml index aec07928..3081eb3f 100644 --- a/app/Console/Commands/TestFiles/fixtures.xml +++ b/app/Console/Commands/TestFiles/fixtures.xml @@ -1,21 +1,1021 @@ - - - + + + FBAUS A-League-25 -Auckland FC -Newcastle Jets +Macarthur FC +Auckland FC -Fin - - - +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Atletico Mineiro U20 +Uniao Rondonopolis U20 + +Fin + + + + + +FBBRA Sao Paulo Copinha-26 +Meia Noite U20 +Ponte Preta SP U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Real RR U20 +Coritiba PR U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Galvez U20 +Gremio U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Remo PA U20 +Batalhao U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Votuporanguense SP U20 +Falcon U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Mirassol SP U20 +Linense U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Sfera U20 +Brasiliense U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Palmeiras SP U20 +Monte Roraima U20 + +Sched + + + + + +FBBRA Sao Paulo Copinha-26 +Forte U20 +Sport Recife PE U20 + +Sched + + + + + +FBENG Championship > Regular Season-25 +Leicester +West Bromwich Albion + +Sched + + + + + +FBENG Conference N / S > South-25 +Chelmsford +Slough + +Post + + + + + +FBENG Professional Development League-25 +Barnsley U21 +Crewe U21 + +Sched + + + + + +FBFRA Ligue 2-25 +Montpellier +Dunkerque + +Sched + + + + + +FBINT Africa Cup of Nations-25 +Egypt +Benin + +Sched + + + + + +FBINT Africa Cup of Nations-25 +Nigeria +Mozambique + +Sched + + + + + +FBISR Ligat ha'Al-25 +Maccabi Haifa +Hapoel Haifa + +Sched + + + + + +FBISR Liga Leumit-25 +Ironi Modin +Hapoel Hadera + +Sched + + + + + +FBISR Liga Leumit-25 +Kiryat Yam SC +Hapoel Nof HaGalil + +Sched + + + + + +FBISR Liga Leumit-25 +Hapoel Kfar Shalem +Bnei Yehuda Tel Aviv + +Sched + + + + + +FBISR U19 2nd Division-25 +AS Nordia Jerusalem U19 +Hapoel Jerusalem U19 + +Sched + + + + + +FBISR U19 2nd Division-25 +Hapoel Beit Shean U19 +Hapoel Umm al-Fahm U19 + +Sched + + + + + +FBISR Liga Bet > North A-25 +Hapoel Kaukab +Maccabi Ihud Bnei Avtin + +Sched + + + + + +FBITA Serie C > Girone A-25 +Triestina +Alcione + +Sched + + + + + +FBITA Serie C > Girone C-25 +Benevento +Crotone + +Sched + + + + + +FBITA Serie C > Girone C-25 +Team Altamura +Casertana + +Sched + + + + + +FBITA Serie C > Girone C-25 +Cosenza +Monopoli + +Sched + + + + + +FBNIR Premiership Development League-25 +Cliftonville U20 +Glentoran U20 + +Sched + + + + + +FBNIR Premiership Development League-25 +Linfield U20 +Glenavon U20 + +Sched + + + + + +FBNIR Premiership Development League-25 +Carrick Rangers U20 +Coleraine U20 + +Sched + + + + + +FBNIR Premiership Development League-25 +Dungannon Swifts U20 +Larne U20 + +Sched + + + + + +FBNIR Premiership Development League-25 +Portadown U20 +Crusaders U20 + +Sched + + + + + +FBNIR Premiership Development League-25 +Bangor U20 +Ballymena United U20 + +Sched + + + + + +FBPOR Segunda Liga-25 +Benfica II +FC Porto II + +Sched + + + + + +FBPOR Segunda Liga-25 +Vizela +Torreense + +Sched + + + + + +FBPOR Juniores U19-25 +Rio Ave U19 +Gil Vicente U19 + +Sched + + + + + +FBTUR Super Cup-25 +Galatasaray +Trabzonspor + +Sched + + + + + +FBSGP Premier League 2-25 +Lion City Sailors II +Hougang United II + +Sched + + + + + +FBKSA Division 1-25 +Al Jubail +Al Arabi + +Sched + + + + + +FBKSA Division 1-25 +Al Anwar +Al Adalah + +Sched + + + + + +FBKSA Division 1-25 +Abha +Al Draih + +Sched + + + + + +FBKSA Division 2-25 +Arar +Mudhar + +Sched + + + + + +FBKSA Division 2-25 +Jerash FC +Al Sahel + +Sched + + + + + +FBKSA Division 2-25 +Al-Ain +Al Taraji + +Sched + + + + + +FBKSA Division 2-25 +Weg +Al Qalah + +Sched + + + + + +FBKUW Crown Prince Cup-25 +Al Fahaheel +Al Jazira + +Sched + + + + + +FBKUW Crown Prince Cup-25 +Burgan SC +Al Jahra + +Sched + + + + + +FBMYS Liga M3-25 +Selangor II +Johor Darul Takzim II + +Sched + + + + + +FBEGY Second Division B-25 +El Alameen +Team FC + +Sched + + + + + +FBEGY Second Division B-25 +Sohag +Nasr Taadeen + +Sched + + + + + +FBEGY Second Division B-25 +El Minya +Nogoom Masr + +Sched + + + + + +FBEGY Second Division B-25 +Shoban +MS Suhag City + +Sched + + + + + +FBEGY Second Division B-25 +Qift SC +Tahta + +Sched + + + + + +FBEGY Second Division B-25 +Cascada SC +Fayoum + +Sched + + + + + +FBEGY Second Division B-25 +Luxor +El Qusiya SC + +Sched + + + + + +FBEGY Second Division B-25 +El Maragha +Makadi + +Sched + + + + + +FBEGY Second Division B-25 +Beni Mazar +Tamya + +Sched + + + + + +FBEGY Second Division B-25 +Edfu Center +El Madina El Monowara + +Sched + + + + + +FBEGY Second Division B-25 +Aluminium Nag Hammadi +El Badari + +Sched + + + + + +FBEGY Second Division B-25 +Eastern Company SC +Ittihad El Shorta + +Sched + + + + + +FBEGY Second Division B-25 +Misr El Maqasha +Golden Gate + +Sched + + + + + +FBEGY Second Division B-25 +El Obour Sporting +Alqazaazin + +Sched + + + + + +FBEGY Second Division B-25 +Al Nasr +Al Shams + +Sched + + + + + +FBEGY Second Division B-25 +Sars Allian SC +Misr Insurance FC + +Sched + + + + + +FBEGY Second Division B-25 +Nejmet Sina +Bur Fouad + +Sched + + + + + +FBEGY Second Division B-25 +Mareekh +Montakhab El Suweis + +Sched + + + + + +FBEGY Second Division B-25 +El Zarqa +MS Amer Village + +Sched + + + + + +FBEGY Second Division B-25 +Al Sharkeyah +6th of October + +Sched + + + + + +FBEGY Second Division B-25 +Al Qanater Al Khayreyah Club +Levels FC + +Sched + + + + + +FBEGY Second Division B-25 +Al Nasr Arish SC +Rabat & Lights SC + +Sched + + + + + +FBEGY Second Division B-25 +Ra SC +MS El Nogoom + +Sched + + + + + +FBEGY Second Division B-25 +Diamond +Banha + +Sched + + + + + +FBEGY Second Division B-25 +Al Badr +Sporting Alexandria + +Sched + + + + + +FBEGY Second Division B-25 +MS Abu El Matamir +El Hamam + +Sched + + + + + +FBEGY Second Division B-25 +El Zohour Matrouh +Helal Aldabaa + +Sched + + + + + +FBEGY Second Division B-25 +El Olympi +Alaab Damanhour + +Sched + + + + + +FBEGY League Cup-25 +Al Mokawloon +Ghazl El Mahallah + +Sched + + + + + +FBEGY League Cup-25 +El Masry +Smouha + +Sched + + + + + +FBEGY League Cup-25 +National Bank +Wadi Degla + +Sched + + + + + +FBALG Ligue 1-25 +JS Kabylie +MB Rouissat + +Sched + + + + + +FBALG Ligue 1-25 +MC Alger +CS Constantine + +Sched + + + + + +FBIRQ Iraqi League-25 +Newroz SC +Al Naft + +Sched + + + + + +FBIRQ Iraqi League-25 +Al Minaa +Al Kahraba + +Sched + + + + + +FBIRQ Iraqi League-25 +Nafut Maysan +Diyala + +Sched + + + + + +FBIRQ Iraqi League-25 +Al Zawraa +Al Gharraf + +Sched + + + + + +FBIRQ Iraqi League-25 +Al Karma +Al Najaf + +Sched + + + + + +FBIRQ Premier Division-25 +Al Fahad +Naft Al-Wasat + +Sched + + + + + +FBIRQ Premier Division-25 +Karbalaa FC +Al Nasiriya + +Sched + + + + + +FBIRQ Premier Division-25 +Al Hudod +Masafi Al-Junoob + +Sched + + + + + +FBIRQ Premier Division-25 +Al Hussein +Afak SC + +Sched + + + + + +FBIRQ Premier Division-25 +Al Etisalat +Al Jaish + +Sched + + + + + +FBIRQ Premier Division-25 +Ghaz Al Shamal +Al Bahri + +Sched + + + + + +FBIRQ Premier Division-25 +Al Kadhimiya +Al Hashd Al-Shaabi + +Sched + + + + + +FBBRN Second Division-25 +Al Ittifaq Maqaba +Al Hala + +Sched + + + + + +FBBRN Second Division-25 +Al Tadamun +Busaiteen + +Sched + + + + + +FBBRN Second Division-25 +Qalali +Al Ittihad + +Sched + + + + + +FBJOR Reserve League-25 +Al Ramtha II +Al Salt II + +Sched + + + + + +FBJOR Reserve League-25 +Al Buqaa II +Al Wehdat II + +Sched + + + + + +FBJOR Reserve League-25 +Sama Al Sarhan II +Al Hussein II + +Sched + + + + + +FBICUP Club Friendlies-26 +Jaiba Brava +Cruz Azul + +Fin + + + - + - + @@ -25,19 +1025,629 @@ - - -FBAUS A-League-25 -Western Sydney Wanderers -Macarthur FC + + +FBICUP Club Friendlies-26 +Atlas +Monterrey -Fin - - - +Fin + + + + + +FBICUP Club Friendlies-26 +Alebrijes de Oaxaca +Chapulineros + +Sched + + + + + +FBICUP Club Friendlies-26 +Hannover +Borussia Monchengladbach + +Sched + + + + + +FBICUP Club Friendlies-26 +VfB Stuttgart +Luzern + +Sched + + + + + +FBICUP Club Friendlies-26 +Ulm +Bonner SC + +Sched + + + + + +FBICUP Club Friendlies-26 +Koln +Lugano + +Sched + + + + + +FBICUP Club Friendlies-26 +Malaga +Telstar + +Sched + + + + + +FBICUP Club Friendlies-26 +Marbella +Telstar + +Sched + + + + + +FBICUP Club Friendlies-26 +Erzgebirge Aue +Union Berlin + +Sched + + + + + +FBICUP Club Friendlies-26 +Blau Weiss Mintard +SV Sodingen + +Sched + + + + + +FBIDN Liga 1-25 +Bhayangkara FC +Dewa United + +Sched + + + + + +FBIDN Liga 1-25 +Persik Kediri +Persib Bandung + +Sched + + + + + +FBIDN Liga 2-25 +Barito Putera +Persiku Kudus + +Sched + + + + + +FBIDN Liga 2-25 +Kendal Tornado +PSS Sleman + +Sched + + + + + +FBIDN Liga 4-25 +Persinga Ngawi +PSBI Blitar + +Sched + + + + + +FBIDN Liga 4-25 +PS Mojokerto Putra +PSID Jombang + +Sched + + + + + +FBIDN Liga 4-25 +Akor FC Jombang +Persida Sidoarjo + +Sched + + + + + +FBIDN Liga 4-25 +Persema Malang +Perseta 1970 + +Sched + + + + + +FBIDN Liga 4-25 +Persepon Ponorogo +Persenga Nganjuk + +Sched + + + + + +FBIDN Liga 3-25 +Persikota Tangerang +PSGC Ciamis + +Sched + + + + + +FBIDN Liga 3-25 +Waanal Brothers FC +Persebata Lembata + +Sched + + + + + +FBIND Mumbai Super Division-25 +Ratnam +Salsette FC + +Sched + + + + + +FBIND Mumbai Super Division-25 +Bombay Gymkhana +KSA Juniors + +Sched + + + + + +FBIND Mumbai Super Division-25 +Young Boys FC +Bombay Muslims SC II + +Sched + + + + + +FBIND Goa Pro League-25 +Geno SC +Guardian Angel SC + +Post + + + + + +FBIND Mumbai Elite Division-25 +CFCI +Rudra Iron Born FC + +Sched + + + + + +FBIND Bangalore A Division-25 +Bangalore Eagles +Income Tax + +Sched + + + + + +FBIND Bangalore A Division-25 +Blitz FC +RWF + +Sched + + + + + +FBIND Bangalore A Division-25 +Roots FC +Jawahar Union + +Sched + + + + + +FBIND Bengal Super League-25 +North 24 Parganas +JHR Royal City + +Sched + + + + + +FBIND Bengal Super League-25 +North Bengal United +Burdwan Blasters + +Sched + + + + + +FBJAM Premier League-25 +Tivoli Gardens +Portmore United + +Sched + + + + + +FBLBY Premier League-25 +Al Sadaqa +Al Anwar + +Sched + + + + + +FBLBY Premier League-25 +Al Dahra FC +Al Watan + +Sched + + + + + +FBLBY Premier League-25 +Al Qadisiya +Asswehly + +Sched + + + + + +FBLBY Premier League-25 +Al Ittihad Benghazi +Al Hilal Benghazi + +Sched + + + + + +FBLBY Premier League-25 +Assabah +Al Ahly Tripoli + +Sched + + + + + +FBGHA Division 1-25 +Inter Allies +Golden Kick + +Sched + + + + + +FBETH Premier League-25 +Bahardar +Dire Dawa Kenema + +Sched + + + + + +FBETH Premier League-25 +Ethiopian Medhin +Mekelle 70 Enderta + +Sched + + + + + +FBETH Higher League-25 +Addis Ketema +Soloda Adwa + +Sched + + + + + +FBETH Higher League-25 +Debre Birhan Ketema +Addis Ababa Ketema + +Sched + + + + + +FBMDV Dhivehi League-25 +Eagles +TC Sports Club + +Sched + + + + + +FBMDV Dhivehi League-25 +Buru SC +Green Streets + +Sched + + + + + +FBMRT Premier League-25 +Nouakchott Academie +Pompiers + +Sched + + + + + +FBRWA National Soccer League-25 +Musanze +Al Hilal Omdurman + +Sched + + + + + +FBRWA National Soccer League-25 +Gicumbi +Kiyovu SC + +Sched + + + + + +FBRWA National Soccer League-25 +Gasogi United +Al Merreikh + +Sched + + + + + +FBSLE Premier League-25 +Freetown City +Abacha City + +Sched + + + + + +FBMMR League 2-25 +Myawady +Chinland + +Sched + + + + + +FBMMR National League-25 +Rakhine United +Dagon Star United + +Sched + + + + + +FBMMR National League-25 +Yarmanya United +Dagon Port FC + +Sched + + + + + +FBGMB Division 2-25 +Banjul +Unique Global FC + +Sched + + + + + +FBGMB Division 2-25 +Gunjur United +Wallidan + +Sched + + + + + +FBGMB Division 2-25 +Wagadu +Serekunda United + +Sched + + + + + +FBGMB Division 2-25 +Baalor Sarr +Elite United + +Sched + + + + + +FBGMB Division 2-25 +RS Tallinding +Kanifing East + +Sched + + + + + +FBGMB GFA League-25 +Real de Banjul +Gambian Dutch Lions + +Sched + + + + + +FBGMB GFA League-25 +Medina United FC +Samger + +Sched + + + + + +FBGMB GFA League-25 +Fortune +Bombada + +Sched + + + + + +FBATG Premier Division > Regular Season-25 +John Hughes SC +Ottos Rangers + +Fin + + + + + +WFBMEX Liga MX Femenil > Clausura-25 +Monterrey +Puebla + +Fin + + + - + @@ -50,1488 +1660,23 @@ - - -FBENG Premier League-25 -Crystal Palace -Fulham + + +FBRAFRICA Mapinduzi Cup-26 +Azam +URA -Sched +Sched - - -FBENG Premier League-25 -Liverpool -Leeds + + +FBRAFRICA Mapinduzi Cup-26 +FFC +Simba -Sched - - - - - -FBENG Premier League-25 -Sunderland -Manchester City - -Sched - - - - - -FBENG Premier League-25 -Brentford -Tottenham - -Sched - - - - - -FBENG League Two > Regular Season-25 -Harrogate Town -Tranmere - -Sched - - - - - -FBENG League Two > Regular Season-25 -Barnet -Crawley Town - -Sched - - - - - -FBENG League Two > Regular Season-25 -Colchester -MK Dons - -Sched - - - - - -FBENG League Two > Regular Season-25 -Shrewsbury -Bristol Rovers - -Sched - - - - - -FBENG League Two > Regular Season-25 -Notts County -Accrington - -Sched - - - - - -FBENG League Two > Regular Season-25 -Crewe -Cheltenham - -Sched - - - - - -FBENG League Two > Regular Season-25 -Bromley -Newport County - -Sched - - - - - -FBENG League Two > Regular Season-25 -Swindon -Gillingham - -Sched - - - - - -FBENG League Two > Regular Season-25 -Cambridge -Walsall - -Sched - - - - - -FBENG League Two > Regular Season-25 -Barrow -Salford City - -Sched - - - - - -FBENG League Two > Regular Season-25 -Fleetwood Town -Grimsby - -Sched - - - - - -FBENG League Two > Regular Season-25 -Oldham -Chesterfield - -Sched - - - - - -FBENG Championship > Regular Season-25 -Blackburn Rovers -Wrexham - -Sched - - - - - -FBENG Championship > Regular Season-25 -Preston -Sheffield Wednesday - -Sched - - - - - -FBENG Championship > Regular Season-25 -Bristol City -Portsmouth - -Sched - - - - - -FBENG Championship > Regular Season-25 -Hull City -Stoke - -Sched - - - - - -FBENG Championship > Regular Season-25 -Ipswich -Oxford United - -Sched - - - - - -FBENG Championship > Regular Season-25 -Derby -Middlesbrough - -Sched - - - - - -FBENG Championship > Regular Season-25 -Charlton -Coventry - -Sched - - - - - -FBENG Championship > Regular Season-25 -Southampton -Millwall - -Sched - - - - - -FBENG Championship > Regular Season-25 -Swansea -West Bromwich Albion - -Sched - - - - - -FBENG Championship > Regular Season-25 -Watford -Birmingham - -Sched - - - - - -FBENG Championship > Regular Season-25 -QPR -Norwich City - -Sched - - - - - -FBENG Championship > Regular Season-25 -Sheffield United -Leicester - -Sched - - - - - -FBENG League One > Regular Season-25 -Reading -Burton Albion - -Sched - - - - - -FBENG League One > Regular Season-25 -Wycombe -Cardiff City - -Sched - - - - - -FBENG League One > Regular Season-25 -Lincoln -Huddersfield - -Sched - - - - - -FBENG League One > Regular Season-25 -Port Vale -Blackpool - -Sched - - - - - -FBENG League One > Regular Season-25 -Leyton Orient -AFC Wimbledon - -Sched - - - - - -FBENG League One > Regular Season-25 -Doncaster -Bolton - -Sched - - - - - -FBENG League One > Regular Season-25 -Rotherham -Peterborough - -Sched - - - - - -FBENG League One > Regular Season-25 -Northampton -Stockport - -Sched - - - - - -FBENG League One > Regular Season-25 -Mansfield -Bradford - -Sched - - - - - -FBENG League One > Regular Season-25 -Stevenage -Plymouth - -Sched - - - - - -FBENG League One > Regular Season-25 -Exeter -Luton Town - -Sched - - - - - -FBENG League One > Regular Season-25 -Wigan -Barnsley - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Morpeth Town -Stockton Town - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Stocksbridge Park Steels -Guiseley - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Warrington -Leek Town - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Workington -Lancaster - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Gainsborough Trinity -Cleethorpes Town - -Sched - - - - - -FBENG Non League Premier > Northern-25 -FC Utd of Manchester -Ashton - -Sched - - - - - -FBENG Non League Premier > Northern-25 -Rushall Olympic -Hednesford - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Runcorn Linnets -Witton Albion - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Chasetown -Sporting Khalsa - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Congleton Town -Kidsgrove Athletic - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Avro -Mossley - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Nantwich Town -Stafford Rangers - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Clitheroe -Atherton Collieries - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Darlaston Town -Shifnal Town - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Stalybridge Celtic -Bury AFC - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Newcastle Town -Vauxhall Motors - -Sched - - - - - -FBENG Non League Div One > Northern West-25 -Wythenshawe Town -Trafford - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Bedworth United -Coventry Sphinx - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Belper Town -Basford United - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Shepshed Dynamo -Rugby - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Mickleover Sports -Loughborough University - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Coleshill Town -Boldmere St. Michaels - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Wellingborough Town -St Neots Town - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Sutton Coldfield -Lichfield City - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Rugby Borough -Racing Club Warwick - -Sched - - - - - -FBENG Non League Div One > Northern Midlands-25 -Corby -AFC Rushden & Diamonds - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Grimsby Borough -North Ferriby - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Blyth Spartans -Blyth Town - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Bishop Auckland -Consett - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Matlock -Silsden - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -AFC Emley -Ossett United - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Bridlington Town -Redcar Athletic - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Pontefract Collieries -Garforth Town - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Brighouse Town -Bradford PA - -Sched - - - - - -FBENG Non League Div One > Northern East-25 -Hallam -Lincoln United - -Sched - - - - - -FBENG Non League Div One > Isthmian South Central-25 -Bognor Regis Town -Littlehampton Town - -Sched - - - - - -FBINT Youth Friendlies-26 -Jordan U23 -Japan U23 - -Sched - - - - - -FBISR Ligat ha'Al-25 -Beitar Jerusalem -Hapoel Tel Aviv - -Sched - - - - - -FBISR Liga Alef > South-25 -Shimshon Tel Aviv -Maccabi Kiryat Malakhi - -Sched - - - - - -FBISR Liga Alef > South-25 -Tzeirey Tira -FC Jerusalem - -Sched - - - - - -FBISR Liga Alef > North-25 -Maccabi Neve Shaanan Eldad -Hapoel Bnei Musmus - -Sched - - - - - -FBISR Liga Bet > South A-25 -Hakoah Ramat Gan -Beitar Petah Tikva - -Sched - - - - - -FBISR Liga Bet > South B-25 -Hapoel Bnei Ashdod -Maccabi Beer Sheva - -Sched - - - - - -FBISR Liga Bet > South B-25 -Ihud Tzeirey Abu Gosh -Ironi Bet Shemesh - -Sched - - - - - -FBISR Liga Bet > South B-25 -MS Shikun Hamizrach -Arad - -Sched - - - - - -FBWAL Feeder Leagues-25 -Denbigh Town -Gresford Athletic - -Sched - - - - - -FBWAL Feeder Leagues-25 -Airbus UK -Flint Mountain - -Sched - - - - - -FBWAL Feeder Leagues-25 -CPD Y Rhyl 1879 -Llandudno - -Sched - - - - - -FBWAL Feeder Leagues-25 -Holywell -Holyhead Hotspur - -Sched - - - - - -FBWAL Feeder Leagues-25 -Buckley Town -Mold Alexandra - -Sched - - - - - -FBWAL Feeder Leagues-25 -Caersws -Newtown - -Sched - - - - - -FBWAL Feeder Leagues-25 -Cambrian United -Pontypridd - -Sched - - - - - -FBWAL Feeder Leagues-25 -Aberystwyth -Carmarthen Town - -Sched - - - - - -FBWAL Premier League-25 -Colwyn Bay -Flint Town Utd - -Sched - - - - - -FBWAL Premier League-25 -Llanelli Town -Penybont - -Sched - - - - - -FBIRI Persian Gulf Pro League-25 -Sepahan -Esteghlal Tehran - -Sched - - - - - -FBKSA Division 1-25 -Al Tai -Al Zulfi - -Sched - - - - - -FBKSA Division 1-25 -Al Orubah -Al Jandal - -Sched - - - - - -FBKSA Division 1-25 -Al Faisaly -Al Raed - -Sched - - - - - -FBKSA Division 2-25 -Weg -Al-Rayyan - -Sched - - - - - -FBSYR Premier League-25 -Tishreen -Khan Shaykhun - -Sched - - - - - - - - - - - - - - - - - - - - -FBSYR Premier League-25 -Omyyah -Hottain - -Sched - - - - - -FBQAT Olympic League-25 -Al Gharafa U23 -Al Wakrah U23 - -Sched - - - - - -FBQAT Olympic League-25 -Al Sadd U23 -Al Sailiya U23 - -Sched - - - - - -FBQAT Olympic League-25 -Umm Salal U23 -Al Rayyan U23 - -Sched - - - - - -FBOMA U21 Championship-25 -Dhofar U21 -Al Shabab U21 - -Sched - - - - - -FBKUW Premier League-25 -Al Fahaheel -Al Jahra - -Sched - - - - - -FBEGY League Cup-25 -Wadi Degla -El Gounah - -Sched - - - - - -FBEGY League Cup-25 -Al Ittihad Al Iskandary -El Zamalek - -Sched - - - - - -FBEGY League Cup-25 -El Ismaily -Modern - -Sched - - - - - -FBALG U20 League-25 -CB Mila U20 -US Chaouia U20 - -Sched - - - - - -FBALG U20 League-25 -JS Kabylie U20 -JS Tixeraine U20 - -Sched - - - - - -FBALG U20 League-25 -Olympique Akbou U20 -USM Harrach U20 - -Sched - - - - - -FBALG U20 League-25 -ES Ben Aknoun U20 -Paradou AC U20 - -Sched - - - - - -FBALG U20 League-25 -MC Alger U20 -NA Hussein Dey U20 - -Sched - - - - - -FBALG U20 League-25 -JS El Biar U20 -JS Bordj Menail U20 - -Sched - - - - - -FBALG U20 League-25 -RC Kouba U20 -MO Bejaia U20 - -Sched - - - - - -FBALG U20 League-25 -CR Belouizdad U20 -USM Alger U20 - -Sched - - - - - -FBALG U20 League-25 -JSM Tiaret U20 -FCB Frenda U20 - -Sched - - - - - -FBIRQ Iraqi League-25 -Al Minaa -Newroz SC - -Sched - - - - - -FBIRQ Iraqi League-25 -Al Najaf -Al Naft - -Sched - - - - - -FBIRQ Iraqi League-25 -Al Kahraba -Al Zawraa - -Sched - - - - - -FBBRN Premier League-25 -Al Hidd -Al Ahli Manama - -Sched - - - - - -FBIDN Liga 4-25 -Bongoayu -Lakeya - -Sched - - - - - -FBIDN Liga 4-25 -Sidosel FC -Telaga Biru FC - -Sched - - - - - -FBIND Delhi Senior Division-25 -United Bharat FC -Juba Sangha - -Sched - - - - - -FBIND Delhi Senior Division-25 -Ajmal FC -Frontier - -Sched - - - - - -FBIND Bengal Super League-25 -Sundarban Bengal Auto -Medinipur - -Sched - - - - - -FBJAM Premier League-25 -Treasure Beach -Chapelton - -Sched - - - - - -FBLBY Premier League-25 -Al-Afreky -Al Wefaq Ajdabiyah - -Sched - - - - - -FBLBY Premier League-25 -Al Akhdar -Al Moroj - -Sched - - - - - -FBLBY Premier League-25 -Ittihad Gharyan -Al Athad - -Sched - - - - - -FBLBY Premier League-25 -Al Shomooa -Al Ittihad - -Sched - - - - - -WFBJPN Empress's Cup-25 -INAC Leonessa -Sanfrecce Hiroshima - -Fin - - - - - -FBUGA 2nd Division-25 -Ntugasaze -Bright Stars - -Sched - - - - - -FBGHA Cup-25 -Eleven Wonders -Police Nationale - -Sched - - - - - -WFBUKR Premier League Women-25 -Ladomir -Kryvbas - -Sched - - - - - -WFBUKR Premier League Women-25 -Pantery -SeaSters - -Sched - - - - - -WFBUKR Premier League Women-25 -Polissya -Kolos Kovalivka - -Sched - - - - - -WFBUKR Premier League Women-25 -Shakhtar Donetsk -EMC Podolie - -Sched - - - - - -WFBUKR Premier League Women-25 -Metalist 1925 Kharkiv -Vorskla Poltava - -Sched - - - - - -WFBISR Ligat Al Women-25 -Ironi Ramat HaSharon -Maccabi Holon - -Sched - - - - - -WFBISR Ligat Al Women-25 -Maccabi Kiryat Gat -Maccabi ASA Tel Aviv - -Sched - - - - - -WFBISR Ligat Al Women-25 -Hapoel Ra'anana -Panthers Ashdod - -Sched - - - - - -WFBISR Ligat Al Women-25 -Hapoel Jerusalem -Maccabi Kishronot Hadera - -Sched - - - - - -WFBBGD Women's Football League-25 -Nasrin Sports Academy -Rajshahi Stars - -Sched - - - - - -WFBBGD Women's Football League-25 -Bangladesh Army FC -BKSP - -Sched +Sched diff --git a/app/Mapper/LoadEvents.php b/app/Mapper/LoadEvents.php index 08d59cf4..8a09e478 100644 --- a/app/Mapper/LoadEvents.php +++ b/app/Mapper/LoadEvents.php @@ -3,40 +3,44 @@ namespace App\Mapper; use App\Models\Event; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; class LoadEvents { public static function load() { + + $query = Event::query()->where('sport_id', Auth::user()->sport_id)->where('starttime', '>', Carbon::now()); + switch (Auth::user()->provider_id) { case 2: // BETSAPI - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('betsapi_id', 0); + return $query->where('betsapi_id', 0); break; case 3: // Magloo Kenia - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('magken_id', 0); + return $query->where('magken_id', 0); break; case 4: // Magloo Nigeria - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('magnig_id', 0); + return $query->where('magnig_id', 0); break; case 5: // Logifuture Nigeria - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('lognig_id', 0); + return $query->where('lognig_id', 0); break; case 6: // Magloo Colombia - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('logcol_id', 0); + return $query->where('logcol_id', 0); break; default: - return Event::query()->where('sport_id', Auth::user()->sport_id)->where('betradar_id', 0); + return $query->where('betradar_id', 0); break; } diff --git a/app/Mapper/LoadProvider.php b/app/Mapper/LoadProvider.php index 0c6d972d..1cd84251 100644 --- a/app/Mapper/LoadProvider.php +++ b/app/Mapper/LoadProvider.php @@ -3,12 +3,16 @@ namespace App\Mapper; use App\Models\Mapper; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; class LoadProvider { public static function load() { - return Mapper::query()->where('sport_id', Auth::user()->sport_id)->where('provider_id', Auth::user()->provider_id); + return Mapper::query() + ->where('sport_id', Auth::user()->sport_id) + ->where('starttime', '>', Carbon::now()) + ->where('provider_id', Auth::user()->provider_id); } } diff --git a/app/Utilities/Supervisorctl.php b/app/Utilities/Supervisorctl.php index 1f986e6f..b0b15d10 100644 --- a/app/Utilities/Supervisorctl.php +++ b/app/Utilities/Supervisorctl.php @@ -2,7 +2,6 @@ namespace App\Utilities; -use App\Models\Provider; use App\Models\Supervisor; class Supervisorctl @@ -23,7 +22,7 @@ class Supervisorctl self::$code = $options['supervisor_id']; - $supervisor = Supervisor::find(self::$code); + $supervisor = Supervisor::with('sport')->with('provider')->find(self::$code); if ($supervisor) { if ($debug) { @@ -31,7 +30,6 @@ class Supervisorctl } $options = array_merge($options, $supervisor->toArray()); - $options['process'] = Provider::where('id', $options['provider_id'])->value('name'); if ($proxy) { $options['proxy'] = 'https://prox2.nuhodds.com/proxy.php'; } diff --git a/database/migrations/2023_05_25_112700_create_events_table.php b/database/migrations/2023_05_25_112700_create_events_table.php index e2b96114..a4783578 100644 --- a/database/migrations/2023_05_25_112700_create_events_table.php +++ b/database/migrations/2023_05_25_112700_create_events_table.php @@ -26,7 +26,7 @@ return new class extends Migration $table->dateTime('starttime')->nullable(); $table->integer('sport_id')->index()->references('id')->on('sports'); $table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries'); - $table->integer('group_id')->default(0)->nullable()->index()->references('id')->on('groups'); + $table->integer('group_id')->default(0)->nullable()->index(); $table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups'); $table->integer('home_id')->default(0)->nullable()->index()->references('id')->on('elements'); $table->integer('away_id')->default(0)->nullable()->index()->references('id')->on('elements'); diff --git a/database/seeders/SupervisorSeeder.php b/database/seeders/SupervisorSeeder.php index e88f945e..9025e58f 100644 --- a/database/seeders/SupervisorSeeder.php +++ b/database/seeders/SupervisorSeeder.php @@ -24,7 +24,15 @@ class SupervisorSeeder extends Seeder (8, 'Fixtures', 4, 0, 10, 0, '1.368', 30, 0, 1, 1, '2025-12-18 17:44:33', '2026-01-03 12:24:52'), (9, 'Odds', 4, 0, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53'), (10, 'Fixtures', 3, 0, 10, 0, '1.368', 30, 0, 1, 1, '2025-12-18 17:44:33', '2026-01-03 12:24:52'), - (11, 'Odds', 3, 0, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53'); + (11, 'Odds', 3, 0, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53'), + (12, 'Odds', 5, 1, 10, 0, '1.368', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-05 06:22:27'), + (13, 'Odds', 5, 3, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-05 06:22:37'), + (14, 'Odds', 5, 2, 10, 0, '1.368', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-05 06:22:51'), + (15, 'Odds', 5, 5, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53'), + (16, 'Odds', 6, 1, 10, 0, '1.368', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-05 06:22:27'), + (17, 'Odds', 6, 3, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-05 06:22:37'), + (18, 'Odds', 6, 2, 10, 0, '1.368', 30, 0, 0, 1, '2025-12-18 17:44:33', '2026-01-05 06:22:51'), + (19, 'Odds', 6, 5, 15, 0, NULL, 1800, 0, 0, 1, '2026-01-03 12:27:44', '2026-01-03 12:27:53'); "; DB::unprepared($sql); }