option('event'); $event = Event::find($eventId); if (!$event) { $this->error('Event not found: '.$eventId); return 1; } // Create A01..A36 and B01..B36 $this->info('Seeding flights for event '.$eventId); $courses = ['A','B']; foreach ($courses as $course) { $idx = 1; for ($hole=1; $hole<=18; $hole++) { foreach (['A','B'] as $tee) { $code = $course . str_pad((string)$idx, 2, '0', STR_PAD_LEFT); Flight::updateOrCreate( ['event_id' => $eventId, 'code' => $code], [ 'course' => $course, 'start_hole' => $hole, 'start_tee' => $tee, 'type' => 'NORMAL', 'status' => 'OPEN', ] ); $idx++; } } } $this->info('Done.'); return 0; } }