2016-01-08 08:56:35 -06:00
|
|
|
<?php
|
2016-09-17 00:57:32 -05:00
|
|
|
/**
|
|
|
|
* ModelFactory.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-04 23:52:15 -05:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-09-17 00:57:32 -05:00
|
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
2016-05-20 01:57:45 -05:00
|
|
|
|
2016-09-15 23:19:40 -05:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Model Factories
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here you may define all of your model factories. Model factories give
|
|
|
|
| you a convenient way to create models for testing and seeding your
|
|
|
|
| database. Just tell the factory how a default model should look.
|
|
|
|
|
|
|
|
|
*/
|
2016-05-20 01:57:45 -05:00
|
|
|
|
2016-09-17 00:57:32 -05:00
|
|
|
$factory->define(
|
|
|
|
FireflyIII\User::class, function (Faker\Generator $faker) {
|
2016-09-15 23:19:40 -05:00
|
|
|
static $password;
|
2016-01-08 08:56:35 -06:00
|
|
|
|
|
|
|
return [
|
2016-09-17 00:57:32 -05:00
|
|
|
'email' => $faker->safeEmail,
|
|
|
|
'password' => $password ?: $password = bcrypt('secret'),
|
2016-01-08 08:56:35 -06:00
|
|
|
'remember_token' => str_random(10),
|
|
|
|
];
|
2016-09-17 00:57:32 -05:00
|
|
|
}
|
|
|
|
);
|