Files
izyim-api/database/factories/UserFactory.php
T
Zain Fauzan Rofie Azizi 19f97d0662 added unit testing
2018-05-04 16:13:51 +08:00

24 lines
697 B
PHP

<?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => bcrypt(str_random(10)), // secret
'remember_token' => str_random(10),
];
});