season in countries

This commit is contained in:
salam committed 2026-06-15 15:41:40 +02:00
1 parent ff4a4d9544
commit 0b9e99e844
4 files changed
+52 -12

No files matched your search

+12 -10
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) {
@@ -31,14 +31,15 @@ class ImportEvents
3 => 1661
4 => 4781
*/
StatistikoEvent::updateOrCreate([
'match_id' => (int) $row[0],
'sport_id' => (int) $row[1],
'league_id' => (int) $row[2],
'home_id' => (int) $row[3],
'away_id' => (int) $row[4],
'starttime' => Carbon::parse($row[5])->toIso8601String(),
],
StatistikoEvent::updateOrCreate(
[
'match_id' => (int) $row[0],
'sport_id' => (int) $row[1],
'league_id' => (int) $row[2],
'home_id' => (int) $row[3],
'away_id' => (int) $row[4],
'starttime' => Carbon::parse($row[5])->toIso8601String(),
],
[
'season' => (int) $row[6],
'gls_h' => (int) $row[7],
@@ -62,7 +63,8 @@ class ImportEvents
'result_code' => $row[25], // w, d, l
'created_at' => $now,
'updated_at' => $now,
]);
]
);
// StatistikoEvent::where('match_id', (int) $row[0])
// ->where('sport_id', (int) $row[1])