You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
762 B

4 years ago
  1. <?php
  2. namespace Database\Factories;
  3. use App\Models\User;
  4. use Illuminate\Database\Eloquent\Factories\Factory;
  5. use Illuminate\Support\Str;
  6. class UserFactory extends Factory
  7. {
  8. /**
  9. * The name of the factory's corresponding model.
  10. *
  11. * @var string
  12. */
  13. protected $model = User::class;
  14. /**
  15. * Define the model's default state.
  16. *
  17. * @return array
  18. */
  19. public function definition()
  20. {
  21. return [
  22. 'name' => $this->faker->name,
  23. 'email' => $this->faker->unique()->safeEmail,
  24. 'email_verified_at' => now(),
  25. 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
  26. 'remember_token' => Str::random(10),
  27. ];
  28. }
  29. }