My SMM panel
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

49 wiersze
1.1 KiB

  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. 'url' => $this->faker->unique()->safeEmail,
  25. 'email_verified_at' => now(),
  26. 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
  27. 'remember_token' => Str::random(10),
  28. ];
  29. }
  30. /**
  31. * Indicate that the model's email address should be unverified.
  32. *
  33. * @return \Illuminate\Database\Eloquent\Factories\Factory
  34. */
  35. public function unverified()
  36. {
  37. return $this->state(function (array $attributes) {
  38. return [
  39. 'email_verified_at' => null,
  40. ];
  41. });
  42. }
  43. }