Skip to content

Commit

Permalink
Fix time of the seeded edition
Browse files Browse the repository at this point in the history
  • Loading branch information
IGORnvk committed Nov 9, 2024
1 parent 6b217bb commit 2da84d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/Livewire/Forms/EditionForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 9 additions & 9 deletions database/seeders/EditionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]);
}
}

0 comments on commit 2da84d1

Please sign in to comment.