1 |
5d28dbf4
|
Marek Lovčí
|
<?php
|
2 |
|
|
|
3 |
|
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
4 |
|
|
|
5 |
|
|
use App\User;
|
6 |
|
|
use Faker\Generator as Faker;
|
7 |
|
|
use Illuminate\Support\Str;
|
8 |
|
|
|
9 |
|
|
/*
|
10 |
|
|
|--------------------------------------------------------------------------
|
11 |
|
|
| Model Factories
|
12 |
|
|
|--------------------------------------------------------------------------
|
13 |
|
|
|
|
14 |
|
|
| This directory should contain each of the model factory definitions for
|
15 |
|
|
| your application. Factories provide a convenient way to generate new
|
16 |
|
|
| model instances for testing / seeding your application's database.
|
17 |
|
|
|
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
$factory->define(User::class, function (Faker $faker) {
|
21 |
|
|
return [
|
22 |
|
|
'name' => $faker->name,
|
23 |
|
|
'email' => $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 |
|
|
});
|