firefly-iii/database/factories/ModelFactory.php

35 lines
978 B
PHP
Raw Normal View History

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