From 537dad33276b8249a7fa6faa8212e772d0698d74 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 17 Aug 2026 11:25:25 +0200 Subject: [PATCH] Statistiko in header --- app/Console/Commands/Grap.php | 6 ++---- app/Console/Commands/Grapper/Sofascore/Grapper.php | 2 +- .../Commands/Grapper/Sofascore/Helper/SetStorage.php | 2 ++ app/Console/Commands/Grapper/Sofascore/MakeExcel.php | 2 +- app/Filament/Pages/Statistic.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Console/Commands/Grap.php b/app/Console/Commands/Grap.php index ad68641a..3cc98f3c 100644 --- a/app/Console/Commands/Grap.php +++ b/app/Console/Commands/Grap.php @@ -16,12 +16,10 @@ use Illuminate\Console\Command; class Grap extends Command { public static $options = []; - public static string $storage; - public static string $zipfile; - public static string $folder; + public static string $excel; public static string $useragent = '4'; @@ -77,7 +75,7 @@ class Grap extends Command case 3: SetStorage::set(3); - Grapper::load(3); + // Grapper::load(3); MakeExcel::create(); diff --git a/app/Console/Commands/Grapper/Sofascore/Grapper.php b/app/Console/Commands/Grapper/Sofascore/Grapper.php index 419422d7..c2ea2973 100644 --- a/app/Console/Commands/Grapper/Sofascore/Grapper.php +++ b/app/Console/Commands/Grapper/Sofascore/Grapper.php @@ -119,7 +119,7 @@ class Grapper $grapped->url = $url; $grapped->starttime = $starttime->toDateTimeString(); - $folder = Grap::$storage . '/' . $day . '/' . $day . '-' . $event['tournament']['category']['slug'] . '-' . $event['tournament']['slug'] . '/' . $event['slug']; + $folder = strtolower(Grap::$storage . '/' . $day . '/' . $day . '-' . $event['tournament']['category']['slug'] . '-' . $event['tournament']['slug'] . '/' . $event['slug']); File::makeDirectory($folder, 0775, true, true); diff --git a/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php b/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php index 2ba95fdc..6df0bd9d 100644 --- a/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php +++ b/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php @@ -28,6 +28,7 @@ class SetStorage case 1: Grap::$storage = $sofascore_data . $storage_name; Grap::$folder = Carbon::now()->subDays($day)->format('Y-m-d'); + Grap::$excel = Grap::$storage . '/' . Grap::$folder; break; case 2: Grap::$storage = $sofascore_data . $storage_name . '/' . $task->day_from; @@ -36,6 +37,7 @@ class SetStorage case 3: Grap::$storage = $sofascore_data . 'range/' . $storage_name; Grap::$folder = $storage_name . '-' . $task->day_from . '-' . $task->day_to; + Grap::$excel = $sofascore_data . 'range/' . $storage_name; break; case 4: Grap::$storage = $sofascore_data . $storage_name; diff --git a/app/Console/Commands/Grapper/Sofascore/MakeExcel.php b/app/Console/Commands/Grapper/Sofascore/MakeExcel.php index 4a35ebc5..3cca9cef 100644 --- a/app/Console/Commands/Grapper/Sofascore/MakeExcel.php +++ b/app/Console/Commands/Grapper/Sofascore/MakeExcel.php @@ -25,7 +25,7 @@ class MakeExcel Notice::note("Make Excel"); } - $files = ReadDir::get_tree(Grap::$storage . '/' . Grap::$folder); + $files = ReadDir::get_tree(Grap::$excel); $files = array_chunk(FileType::filter($files), self::$max); diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index cf650c2d..5e89a25f 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -36,7 +36,7 @@ class Statistic extends BaseDashboard protected ?string $pollingInterval = null; - protected static ?string $title = 'Statistic'; + protected static ?string $title = 'Statistiko'; protected int|string|array $columnSpan = [ 'md' => 2,