@@ -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 ' ],
@@ -41,10 +33,11 @@ public function model(array $row): ?Model
4133 'activity_type ' => $ row ['activity_type ' ],
4234 'location ' => isset ($ row ['address ' ]) ? $ row ['address ' ] : 'online ' ,
4335 'event_url ' => $ row ['organiser_website ' ],
36+ 'contact_person ' => !empty ($ row ['contact_email ' ]) ? $ row ['contact_email ' ] : '' ,
4437 'user_email ' => '' ,
45- 'creator_id ' => $ row [ ' creator_id ' ] ,
38+ 'creator_id ' => 132942 ,
4639 'country_iso ' => $ row ['country ' ],
47- 'picture ' => $ row ['image_path ' ],
40+ 'picture ' => isset ( $ row ['image_path ' ]) ? $ row [ ' image_path ' ] : '' ,
4841 'pub_date ' => now (),
4942 'created ' => now (),
5043 'updated ' => now (),
@@ -54,7 +47,7 @@ public function model(array $row): ?Model
5447 'geoposition ' => $ row ['latitude ' ].', ' .$ row ['longitude ' ],
5548 'longitude ' => $ row ['longitude ' ],
5649 'latitude ' => $ row ['latitude ' ],
57- 'language ' => 'nl ' ,
50+ 'language ' => isset ( $ row [ ' language ' ]) ? $ row [ ' language ' ] : 'nl ' ,
5851 'approved_by ' => 19588 ,
5952 'mass_added_for ' => 'Excel ' ,
6053 ]);
0 commit comments