laravel/database/factories/UserFactory.php

28 lines
875 B
PHP
Raw Normal View History

2015-05-08 08:42:04 -05:00
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
2018-12-18 09:07:33 -06:00
use App\User;
use Faker\Generator as Faker;
2019-09-10 17:26:00 +02:00
use Illuminate\Support\Str;
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
2018-12-18 09:07:33 -06:00
$factory->define(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,
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
2019-02-12 16:53:32 +01:00
'remember_token' => Str::random(10),
2015-05-08 08:42:04 -05:00
];
2015-05-09 16:43:43 -05:00
});