diff --git a/app/Livewire/Forms/EditionForm.php b/app/Livewire/Forms/EditionForm.php index 328b2835..3c98ba0c 100644 --- a/app/Livewire/Forms/EditionForm.php +++ b/app/Livewire/Forms/EditionForm.php @@ -47,8 +47,8 @@ public function setEdition(Edition $edition) $this->edition = $edition; $this->name = $edition->name; - $this->start_at = $edition->start_at->format('Y-m-d\TH:i:s'); - $this->end_at = $edition->end_at->format('Y-m-d\TH:i:s'); + $this->start_at = Carbon::parse($edition->start_at)->format('Y-m-d H:i'); + $this->end_at = Carbon::parse($edition->end_at)->format('Y-m-d H:i'); $this->lecture_duration = $edition->lecture_duration; $this->workshop_duration = $edition->workshop_duration; $this->upperBoundary = Carbon::now()->addYears(2); diff --git a/database/seeders/EditionSeeder.php b/database/seeders/EditionSeeder.php index 02968ef4..bb149e6f 100644 --- a/database/seeders/EditionSeeder.php +++ b/database/seeders/EditionSeeder.php @@ -16,30 +16,30 @@ class EditionSeeder extends Seeder public function run(): void { Edition::create([ - 'name' => 'We are in IT together Conference ' . date('Y'), - 'start_at' => date('Y-m-d H:i:s', strtotime('2024-11-18 09:00:00')), - 'end_at' => date('Y-m-d H:i:s', strtotime('2024-11-18 17:00:00')), + 'name' => 'We are in IT together Conference ' . Carbon::now()->year, + 'start_at' => Carbon::now()->addMonths(2)->setTime(9, 0), + 'end_at' => Carbon::now()->addMonths(2)->setTime(17, 0), ]); EditionEvent::create([ 'edition_id' => 1, 'event_id' => 1, - 'start_at' => Carbon::now(), - 'end_at' => Carbon::now()->addWeeks(2), + 'start_at' => Carbon::today(), + 'end_at' => Carbon::today()->addWeeks(3), ]); EditionEvent::create([ 'edition_id' => 1, 'event_id' => 2, - 'start_at' => Carbon::now(), - 'end_at' => Carbon::now()->addWeeks(2), + 'start_at' => Carbon::today(), + 'end_at' => Carbon::today()->addWeeks(3), ]); EditionEvent::create([ 'edition_id' => 1, 'event_id' => 3, - 'start_at' => Carbon::now(), - 'end_at' => Carbon::now()->addWeeks(2), + 'start_at' => Carbon::today(), + 'end_at' => Carbon::today()->addWeeks(3), ]); } }