From 085dc78e261cac38cfc72d83e496f9b2911bf29b Mon Sep 17 00:00:00 2001 From: salam Date: Tue, 15 Sep 2026 10:45:45 +0200 Subject: [PATCH] wip --- app/Filament/Imports/Helper/ImportDetails.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Filament/Imports/Helper/ImportDetails.php b/app/Filament/Imports/Helper/ImportDetails.php index 4ab1f948..566da27d 100644 --- a/app/Filament/Imports/Helper/ImportDetails.php +++ b/app/Filament/Imports/Helper/ImportDetails.php @@ -11,9 +11,7 @@ class ImportDetails { public static function run(string $filePath): void { - StatistikoDetail::query()->update(['last_import' => 0]); - - sleep(2); + StatistikoDetail::query()->update(['last_import' => 'out']); SimpleExcelReader::create(storage_path('app/public/'.$filePath)) ->getRows() @@ -23,7 +21,7 @@ class ImportDetails $collection = []; foreach ($chunk as $row) { $row['is_active'] = 1; - $row['last_import'] = 1; + $row['last_import'] = 'in'; $row['birthdate'] = isset($row['birthday']) ? Carbon::parse($row['birthday'])->format('Y-m-d') : ''; unset($row['birthday']); $row['last_update'] = Carbon::parse($row['last_update'])->format('Y-m-d H:i:s'); @@ -50,6 +48,6 @@ class ImportDetails ]); }); - StatistikoDetail::where('last_import', 0)->update(['is_active' => 0, 'ss_team_id' => 0]); + StatistikoDetail::where('last_import', 'out')->update(['is_active' => 0, 'ss_team_id' => 0]); } }