$this->faker->word(), 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), 'event_id' => Event::factory(), 'student_id' => Student::factory(), ]; } public function forStudent(Student $student): self { return $this->state(function (array $attributes) use ($student) { return [ 'student_id' => $student->id, ]; }); } public function forEvent(Event $event): self { return $this->state(function (array $attributes) use ($event) { return [ 'event_id' => $event->id, ]; }); } }