Files
nuhodds_fi4/app/Console/Commands/Grapper/Sofascore.php
T
2026-06-07 07:18:22 +02:00

46 lines
1.0 KiB
PHP

<?php
namespace App\Console\Commands\Grapper;
use App\Console\Commands\Grapper\Sofascore\Tournament;
use App\Console\Commands\Nuh;
use App\Models\SofaScoreCategorie;
use App\Models\SofaScoreDayTournament;
use App\Models\SofaScoreTournament;
use App\Utilities\Notice;
class Sofascore
{
public static $auth_header = [];
public static $base_url = '';
public static $sport = [1];
public static function switch()
{
$debug = Nuh::$options['d'] ?? 0;
$truncat = Nuh::$options['t'] ?? 0;
if ($truncat) {
SofaScoreDayTournament::truncate();
SofaScoreTournament::truncate();
SofaScoreCategorie::truncate();
}
if ($debug) {
Notice::note(Nuh::$options['sport'].' '.Nuh::$options['name'], 'b');
}
switch (Nuh::$options['name']) {
case 'TOURNAMENTS':
Tournament::load();
break;
default:
// code...
break;
}
}
}