📜  点击 laravel 创建假用户 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:26.042000             🧑  作者: Mango

代码示例1
$factory->define(App\User::class, function(Faker $faker) {
    return [
        'first_name'        => $faker->firstName,
        'last_name'         => $faker->lastName,
        'email'             => $faker->unique()->safeEmail,
        'email_verified_at' => now(),
        'password'          => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
        'remember_token'    => str_random(10),
    ];
});