firefly-iii/database/factories/ModelFactory.php

24 lines
699 B
PHP
Raw Normal View History

<?php
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-15 23:19:40 -05:00
$factory->define(FireflyIII\User::class, function (Faker\Generator $faker) {
static $password;
return [
2016-09-15 23:19:40 -05:00
'name' => $faker->name,
'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
2016-09-15 23:19:40 -05:00
});