From 2a54730e60c5511813d0d30cb423408303b5de20 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 14 Sep 2026 21:24:27 +0200 Subject: [PATCH] wip --- app/Filament/Imports/Helper/ImportDetails.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Filament/Imports/Helper/ImportDetails.php b/app/Filament/Imports/Helper/ImportDetails.php index 5d2d1b6d..db4549c4 100644 --- a/app/Filament/Imports/Helper/ImportDetails.php +++ b/app/Filament/Imports/Helper/ImportDetails.php @@ -12,12 +12,12 @@ class ImportDetails { use UpdateHelper; + public static array $player_collection = []; + public static function run(string $filePath): void { $now = now()->format('Y-m-d H:i:s'); - $player_collection = []; - SimpleExcelReader::create(storage_path('app/public/'.$filePath)) ->getRows() ->chunk(1000) @@ -41,7 +41,7 @@ class ImportDetails if ($row[1] != '') { - $player_collection[] = (int) $row[0]; + self::$player_collection[] = (int) $row[0]; StatistikoDetail::upsert( [ @@ -97,9 +97,10 @@ class ImportDetails // ); } } + }); - StatistikoDetail::whereNotIn('ss_player_id', $player_collection)->update(['is_active' => 0, 'ss_team_id' => 0]); + StatistikoDetail::whereNotIn('ss_player_id', self::$player_collection)->update(['is_active' => 0, 'ss_team_id' => 0]); /**update statistic player tabel */ // UpdateHelper::updatePlayers(1000000);