2015-05-08 08:42:04 -05:00
|
|
|
<?php
|
|
|
|
|
2020-04-21 10:12:39 -05:00
|
|
|
namespace Database\Factories;
|
2019-12-31 12:21:39 +00:00
|
|
|
|
2020-04-21 10:12:39 -05:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2019-09-10 17:26:00 +02:00
|
|
|
use Illuminate\Support\Str;
|
2017-04-11 10:41:19 -05:00
|
|
|
|
2022-01-21 12:03:57 +00:00
|
|
|
/**
|
2022-01-21 12:32:08 +00:00
|
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
2022-01-21 12:03:57 +00:00
|
|
|
*/
|
2020-04-21 10:12:39 -05:00
|
|
|
class UserFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
2020-05-18 10:20:51 -05:00
|
|
|
* @return array
|
2020-04-21 10:12:39 -05:00
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2021-04-13 07:28:01 -05:00
|
|
|
'name' => $this->faker->name(),
|
|
|
|
'email' => $this->faker->unique()->safeEmail(),
|
2020-04-21 10:12:39 -05:00
|
|
|
'email_verified_at' => now(),
|
|
|
|
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
|
|
|
'remember_token' => Str::random(10),
|
|
|
|
];
|
|
|
|
}
|
2021-02-09 15:52:23 -05:00
|
|
|
|
|
|
|
/**
|
2021-02-16 10:58:28 -06:00
|
|
|
* Indicate that the model's email address should be unverified.
|
2021-02-09 15:52:23 -05:00
|
|
|
*
|
|
|
|
* @return \Illuminate\Database\Eloquent\Factories\Factory
|
|
|
|
*/
|
|
|
|
public function unverified()
|
|
|
|
{
|
|
|
|
return $this->state(function (array $attributes) {
|
|
|
|
return [
|
|
|
|
'email_verified_at' => null,
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
2020-04-21 10:12:39 -05:00
|
|
|
}
|