| 1 | <?php | = | 1 | <?php |
| 2 | 2 | |||
| 3 | use Faker\Generator as Faker; | 3 | use Faker\Generator as Faker; | |
| 4 | 4 | |||
| 5 | /* | 5 | /* | |
| 6 | |-------------------------------------------------------------------------- | 6 | |-------------------------------------------------------------------------- | |
| 7 | | Model Factories | 7 | | Model Factories | |
| 8 | |-------------------------------------------------------------------------- | 8 | |-------------------------------------------------------------------------- | |
| 9 | | | 9 | | | |
| 10 | | This directory should contain each of the model factory definitions for | 10 | | This directory should contain each of the model factory definitions for | |
| 11 | | your application. Factories provide a convenient way to generate new | 11 | | your application. Factories provide a convenient way to generate new | |
| 12 | | model instances for testing / seeding your application's database. | 12 | | model instances for testing / seeding your application's database. | |
| 13 | | | 13 | | | |
| 14 | */ | 14 | */ | |
| 15 | 15 | |||
| 16 | $factory->define(App\User::class, function (Faker $faker) { | 16 | $factory->define(App\User::class, function (Faker $faker) { | |
| 17 | return [ | 17 | return [ | |
| 18 | 'name' => $faker->name, | 18 | 'name' => $faker->name, | |
| 19 | 'email' => $faker->unique()->safeEmail, | 19 | 'email' => $faker->unique()->safeEmail, | |
| -+ | 20 | 'email_verified_at' => now(), | ||
| 20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret | = | 21 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret |
| 21 | 'remember_token' => str_random(10), | 22 | 'remember_token' => str_random(10), | |
| 22 | ]; | 23 | ]; | |
| 23 | }); | 24 | }); |