Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dutch import #2190

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions app/Console/Commands/excel/Dutch2023.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace App\Console\Commands\excel;

use App\Imports\DutchDanceEventsImport;
use App\Imports\DutchMoorlagEventsImport;
use App\Imports\DutchSimoneEventsImport;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Facades\Excel;

class Dutch2023 extends Command {
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'excel:dutch-2023';

/**
* The console command description.
*
* @var string
*/
protected $description = '2023 Dutch Activities';

/**
* Create a new command instance.
*
* @return void
*/
public function __construct() {
parent::__construct();
}

/**
* Execute the console command.
*
* @return int
*/
public function handle() {
Log::info('Loading 2023 Dutch File');

Excel::import(
new DutchSimoneEventsImport(),
'dutch-2023-14-11.xlsx',
'excel'
);
}
}
4 changes: 2 additions & 2 deletions app/Imports/DutchSimoneEventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public function model(array $row) {
'location' => $row['address'],
'event_url' => $row['organiser_website'],
'user_email' => '',
'creator_id' => 219395,
'creator_id' => 190341,
'contact_person' => $row['contact_email'],
'country_iso' => $row['country'],
'picture' => $row['image_path'],
'pub_date' => now(),
'created' => now(),
'updated' => now(),
'codeweek_for_all_participation_code' => 'cw22-CodeWeekNL',
'codeweek_for_all_participation_code' => 'cw23-CodeWeekNL',
'start_date' => $this->parseDate($row['start_date']),
'end_date' => $this->parseDate($row['end_date']),
'geoposition' => $row['latitude'] . ',' . $row['longitude'],
Expand Down
Binary file added resources/excel/dutch-2023-14-11.xlsx
Binary file not shown.
Loading