TemplateFactory.php 739 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Database\Factories;
  3. use Illuminate\Database\Eloquent\Factories\Factory;
  4. /**
  5. * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Template>
  6. */
  7. class TemplateFactory extends Factory
  8. {
  9. /**
  10. * Define the model's default state.
  11. *
  12. * @return array<string, mixed>
  13. */
  14. public function definition()
  15. {
  16. return [
  17. 'name' => $this->faker->name(),
  18. ];
  19. }
  20. /**
  21. * Indicate that the model's email address should be unverified.
  22. *
  23. * @return static
  24. */
  25. public function unverified()
  26. {
  27. return $this->state(function (array $attributes) {
  28. return [
  29. 'name' => null,
  30. ];
  31. });
  32. }
  33. }