選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ContactFactory.php 491B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Database\Factories\Common;
  3. use App\Models\Common\Contact;
  4. use Illuminate\Database\Eloquent\Factories\Factory;
  5. /**
  6. * @extends Factory<Contact>
  7. */
  8. class ContactFactory extends Factory
  9. {
  10. /**
  11. * Define the model's default state.
  12. *
  13. * @return array<string, mixed>
  14. */
  15. public function definition(): array
  16. {
  17. return [
  18. 'name' => $this->faker->name(),
  19. 'email' => $this->faker->unique()->safeEmail(),
  20. ];
  21. }
  22. }