diff --git a/app/Console/Commands/excel/CodingActivitiesEUCodeWeekSite.php b/app/Console/Commands/excel/CodingActivitiesEUCodeWeekSite.php new file mode 100644 index 000000000..b34000f8b --- /dev/null +++ b/app/Console/Commands/excel/CodingActivitiesEUCodeWeekSite.php @@ -0,0 +1,49 @@ + 'APPROVED', + 'title' => $row['activity_title'], + 'slug' => str_slug($row['activity_title']), + 'organizer' => $row['name_of_organisation'], + 'description' => $row['description'], + 'organizer_type' => $row['type_of_organisation'], + 'activity_type' => $row['activity_type'], + 'location' => isset($row['address']) ? $row['address'] : 'online', + 'event_url' => $row['organiser_website'], + 'contact_person' => !empty($row['contact_email']) ? $row['contact_email'] : '', + 'user_email' => '', + 'creator_id' => 132942, + 'country_iso' => $row['country'], + 'picture' => isset($row['image_path']) ? $row['image_path'] : '', + 'pub_date' => now(), + 'created' => now(), + 'updated' => now(), + 'codeweek_for_all_participation_code' => '', + 'start_date' => $this->parseDate($row['start_date']), + 'end_date' => $this->parseDate($row['end_date']), + 'geoposition' => $row['latitude'].','.$row['longitude'], + 'longitude' => $row['longitude'], + 'latitude' => $row['latitude'], + 'language' => $row['language'], + 'approved_by' => 19588, + 'mass_added_for' => 'Excel', + ]); + + $event->save(); + + $event->audiences()->attach(explode(',', $row['audience_comma_separated_ids'])); + $event->themes()->attach(explode(',', $row['theme_comma_separated_ids'])); + + return $event; + + } +} diff --git a/resources/excel/events.23_24.xlsx b/resources/excel/events.23_24.xlsx new file mode 100644 index 000000000..6d9e4f011 Binary files /dev/null and b/resources/excel/events.23_24.xlsx differ