$this->faker->company(), 'abbreviation' => $this->faker->word(), 'audition_date' => $this->faker->dateTimeBetween('+5 days', '+1 year'), 'status' => ClientStatus::ACTIVE, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ]; } public function withContact(?Contact $contact = null): static { return $this->afterCreating(function (Client $client) use ($contact) { $client->contacts()->attach($contact ?? Contact::factory()->create()); }); } }