wip
This commit is contained in:
1 parent
4fa4e1a611
commit
e46bda0715
10 files changed
+291
-221
No files matched your search
@@ -88,7 +88,7 @@ class StatistikoImporter
|
||||
{
|
||||
$now = now()->format('Y-m-d H:i:s');
|
||||
|
||||
SimpleExcelReader::create(storage_path('app/private/'.$filePath))
|
||||
SimpleExcelReader::create(storage_path('app/public/'.$filePath))
|
||||
->getRows()
|
||||
->chunk(1000)
|
||||
->each(function (LazyCollection $chunk) use ($now) {
|
||||
@@ -131,7 +131,7 @@ class StatistikoImporter
|
||||
{
|
||||
$now = now()->format('Y-m-d H:i:s');
|
||||
|
||||
SimpleExcelReader::create(storage_path('app/private/'.$filePath))
|
||||
SimpleExcelReader::create(storage_path('app/public/'.$filePath))
|
||||
->getRows()
|
||||
->chunk(1000)
|
||||
->each(function (LazyCollection $chunk) use ($now) {
|
||||
@@ -140,16 +140,43 @@ class StatistikoImporter
|
||||
|
||||
foreach ($chunk as $row) {
|
||||
|
||||
$row = array_values($row);
|
||||
dd($row);
|
||||
// print_r($row);
|
||||
|
||||
$row = array_values($row);
|
||||
|
||||
// dd($row);
|
||||
/***
|
||||
[LEAGUE] => 1
|
||||
[HOME] => 2133
|
||||
[AWAY] => 3024
|
||||
[SS_STARTTIME_VALUE] => DateTimeImmutable Object ( [date] => 2022-08-05 18:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Vienna )
|
||||
[SS_SEASON_VALUE] => 2022/2023
|
||||
[GLS_H] => 0
|
||||
[GLS_A] => 0
|
||||
[CRN_H] => 3
|
||||
[CRN_A] => 6
|
||||
[FLS_H] => 5
|
||||
[FLS_A] => 8
|
||||
[OFS_H] => 0
|
||||
[OFS_A] => 2
|
||||
[SNT_H] => 2
|
||||
[SNT_A] => 1
|
||||
[TSH_H] => 11
|
||||
[TSH_A] => 13
|
||||
[CRD_H] => 1
|
||||
[CRD_A] => 1
|
||||
[EXPGOALSHOME_VALUE] => 1.6350036183338
|
||||
[EXPGOALSAWAY_VALUE] => 0.97303070109903
|
||||
[EXP_HANDICAP] => -0.66197291723478
|
||||
[EXP_TOTAL] => 2.6080343194328
|
||||
*/
|
||||
$data[] = [
|
||||
'sport_id' => 1,
|
||||
'league_id' => $row[1],
|
||||
'home_id' => $row[2],
|
||||
'away_id' => $row[3],
|
||||
'starttime' => Carbon::parse($row[4])->toDateTimeString(),
|
||||
'season' => $row[5],
|
||||
'league_id' => $row[0],
|
||||
'home_id' => $row[1],
|
||||
'away_id' => $row[2],
|
||||
'starttime' => Carbon::parse($row[3])->toIso8601String(),
|
||||
'season' => $row[4],
|
||||
'gls_h' => $row[6],
|
||||
'gls_a' => $row[7],
|
||||
'crn_h' => $row[8],
|
||||
|
||||
Reference in new issue
Block a user