@@ -23,14 +23,6 @@ public function parseDate($date)
2323
2424 public function model (array $ row ): ?Model
2525 {
26-
27- // dd($row["start_date"]);
28- //dd(implode(",",$arr));
29- (\PhpOffice \PhpSpreadsheet \Shared \Date::excelToDateTimeObject ($ row ['start_date ' ]));
30- // dd(Carbon::parse($this->parseDate($row["start_date"]))->toDateTimeString());
31- //dd(Carbon::createFromFormat("d/m/Y",$row["start_date"])->toDateTimeString());
32- Log::info ($ row );
33-
3426 $ event = new Event ([
3527 'status ' => 'APPROVED ' ,
3628 'title ' => $ row ['activity_title ' ],
@@ -42,9 +34,9 @@ public function model(array $row): ?Model
4234 'location ' => isset ($ row ['address ' ]) ? $ row ['address ' ] : 'online ' ,
4335 'event_url ' => $ row ['organiser_website ' ],
4436 'user_email ' => '' ,
45- 'creator_id ' => $ row [ ' creator_id ' ] ,
37+ 'creator_id ' => 132942 ,
4638 'country_iso ' => $ row ['country ' ],
47- 'picture ' => $ row ['image_path ' ],
39+ 'picture ' => isset ( $ row ['image_path ' ]) ? $ row [ ' image_path ' ] : '' ,
4840 'pub_date ' => now (),
4941 'created ' => now (),
5042 'updated ' => now (),
@@ -54,7 +46,7 @@ public function model(array $row): ?Model
5446 'geoposition ' => $ row ['latitude ' ].', ' .$ row ['longitude ' ],
5547 'longitude ' => $ row ['longitude ' ],
5648 'latitude ' => $ row ['latitude ' ],
57- 'language ' => 'nl ' ,
49+ 'language ' => isset ( $ row [ ' language ' ]) ? $ row [ ' language ' ] : 'nl ' ,
5850 'approved_by ' => 19588 ,
5951 'mass_added_for ' => 'Excel ' ,
6052 ]);
0 commit comments