mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
First set of upgrade to 5.3 stuff.
This commit is contained in:
33
database/factories/ModelFactory.php
Normal file → Executable file
33
database/factories/ModelFactory.php
Normal file → Executable file
@@ -1,24 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(FireflyIII\User::class, function (Faker\Generator $faker) {
|
||||
static $password;
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\User::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
'password' => bcrypt(str_random(10)),
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->safeEmail,
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\TransactionType::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'type' => $faker->name,
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user