Files
firefly-iii/database/factories/UserFactory.php

47 lines
1.5 KiB
PHP
Raw Normal View History

2018-12-10 21:45:44 +01:00
<?php
2018-12-31 07:48:23 +01:00
/**
* UserFactory.php
* Copyright (c) 2019 thegrumpydictator@gmail.com
2018-12-31 07:48:23 +01:00
*
* This file is part of Firefly III (https://github.com/firefly-iii).
2018-12-31 07:48:23 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
2018-12-31 07:48:23 +01:00
*
* This program is distributed in the hope that it will be useful,
2018-12-31 07:48:23 +01:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
2018-12-31 07:48:23 +01:00
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2018-12-31 07:48:23 +01:00
*/
declare(strict_types=1);
2019-08-17 10:47:51 +02:00
2018-12-10 21:45:44 +01:00
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$factory->define(
FireflyIII\User::class, function (Faker $faker) {
return [
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
}
);