This commit is contained in:
salam committed 2026-09-08 08:44:04 +02:00
1 parent 9f157adc96
commit 29de0c2c6c
13 files changed
+324 -789

No files matched your search

@@ -14,7 +14,7 @@ class ImportDetails
{
$now = now()->format('Y-m-d H:i:s');
SimpleExcelReader::create(storage_path('app/public/' . $filePath))
SimpleExcelReader::create(storage_path('app/public/'.$filePath))
->getRows()
->chunk(1000)
->each(function (LazyCollection $chunk) use ($now) {
@@ -23,11 +23,10 @@ class ImportDetails
$row = array_values($row);
// ss_player_id
//
// ss_player_id
// ss_team_id
// tx_team_id
// player_name
// player_name
// ss_national_team_id
// birthdate
// height
@@ -50,7 +49,7 @@ class ImportDetails
'nationality' => $row[6],
'position' => $row[7],
'preferred_foot' => $row[8],
'last_update' => Carbon::parse($row[9])->format('Y-m-d H:i:s'),
'last_update' => Carbon::parse($row[9])->format('Y-m-d H:i:s'),
'is_active' => 1,
'created_at' => $now,
'updated_at' => $now,
@@ -60,6 +59,8 @@ class ImportDetails
}
});
StatistikoDetail::where('updated_at', '!=', $now)->update(['is_active' => 0]);
/**update statistic player tabel */
PlayerPerSeason::run();
}