laravel/database/factories/UserFactory.php

24 lines
737 B
PHP
Raw Normal View History

2015-05-08 08:42:04 -05:00
<?php
use Faker\Generator as Faker;
2015-05-08 08:42:04 -05:00
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
2015-05-08 08:42:04 -05:00
|
*/
2016-10-07 16:39:42 -05:00
2017-05-06 15:28:45 -04:00
$factory->define(App\User::class, function (Faker $faker) {
2015-05-08 08:42:04 -05:00
return [
'name' => $faker->name,
2016-09-20 08:23:40 +02:00
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
2015-05-08 08:42:04 -05:00
'remember_token' => str_random(10),
];
2015-05-09 16:43:43 -05:00
});