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