pingcrm/database/factories/UserFactory.php

27 lines
780 B
PHP
Raw Normal View History

2019-03-05 18:10:11 -03:00
<?php
use Faker\Generator as Faker;
2019-10-17 07:01:26 -03:00
use Illuminate\Support\Str;
2019-03-05 18:10:11 -03: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.
|
*/
2019-03-18 08:53:00 -03:00
$factory->define(App\User::class, function (Faker $faker) {
2019-03-05 18:10:11 -03:00
return [
2019-03-18 08:53:00 -03:00
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
2019-03-05 18:10:11 -03:00
'email' => $faker->unique()->safeEmail,
2019-03-18 08:53:00 -03:00
'password' => 'secret',
2019-10-17 07:01:26 -03:00
'remember_token' => Str::random(10),
2019-03-18 08:53:00 -03:00
'owner' => false,
2019-03-05 18:10:11 -03:00
];
});