wip grap ss tournament

This commit is contained in:
salam committed 2026-06-07 07:18:22 +02:00
1 parent d4dfb9748c
commit 292acb879e
31 files changed
+4025 -224

No files matched your search

+25 -9
View File
@@ -2,9 +2,12 @@
namespace App\Console\Commands\Grapper;
use App\Console\Commands\Grapper\Sportscore\Helper;
use App\Console\Commands\Grapper\Sofascore\Tournament;
use App\Console\Commands\Nuh;
use App\Models\Sport;
use App\Models\SofaScoreCategorie;
use App\Models\SofaScoreDayTournament;
use App\Models\SofaScoreTournament;
use App\Utilities\Notice;
class Sofascore
{
@@ -12,18 +15,31 @@ class Sofascore
public static $base_url = '';
public static $sport = [];
public static $sport = [1];
public static function switch()
{
self::$sport = Helper::map();
dd(self::$sport, Nuh::$options);
$debug = Nuh::$options['d'] ?? 0;
$truncat = Nuh::$options['t'] ?? 0;
$echo_data = Nuh::$options['e'] ?? 0;
if ($truncat) {
SofaScoreDayTournament::truncate();
SofaScoreTournament::truncate();
SofaScoreCategorie::truncate();
}
$sportmap = Sport::map('logi', 1, [Nuh::$options['sport_id']]);
if ($debug) {
Notice::note(Nuh::$options['sport'].' '.Nuh::$options['name'], 'b');
}
switch (Nuh::$options['name']) {
case 'TOURNAMENTS':
Tournament::load();
break;
default:
// code...
break;
}
}
}