} */ public function definition(): array { return [ 'firstname' => $this->faker->firstName(), 'lastname' => $this->faker->lastName(), 'email' => $this->faker->safeEmail(), ]; } public function name(string $name): self { [$firstname, $lastname] = explode(' ', $name ?: ' '); return $this->state(['firstname' => $firstname, 'lastname' => $lastname]); } public function email(string $email): self { return $this->state(['email' => $email]); } }