fix import events

This commit is contained in:
salam committed 2026-06-10 16:04:40 +02:00
1 parent 8578ec96bb
commit 7665da190c
2 files changed
+28 -14

No files matched your search

+8 -8
View File
@@ -13,7 +13,7 @@ class ImportEvents
{
$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, $importmode) {
@@ -66,14 +66,14 @@ class ImportEvents
['upsert' => true],
);
} else {
StatistikoEvent::import(
StatistikoEvent::insert(
[
'match_id', $row[0],
'sport_id', $row[1],
'league_id', $row[2],
'home_id', $row[3],
'away_id', $row[4],
'starttime', Carbon::parse($row[5])->toIso8601String(),
'match_id' => $row[0],
'sport_id' => $row[1],
'league_id' => $row[2],
'home_id' => $row[3],
'away_id' => $row[4],
'starttime' => Carbon::parse($row[5])->toIso8601String(),
'season' => $row[6],
'gls_h' => $row[7],
'gls_a' => $row[8],