osb/database/factories/UserFactory.php

24 lines
744 B
PHP
Raw Normal View History

2017-11-03 05:26:07 +00:00
<?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.
|
*/
2021-06-29 03:18:52 +00:00
$factory->define(App\Models\User::class, function (Faker $faker) {
2017-11-03 05:26:07 +00:00
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
2017-11-03 05:26:07 +00:00
'remember_token' => str_random(10),
];
});