define( FireflyIII\User::class, function (Faker\Generator $faker) { static $password; return [ 'email' => $faker->safeEmail, 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => str_random(10), ]; } ); $factory->define( FireflyIII\Models\Transaction::class, function (Faker\Generator $faker) { return [ 'transaction_amount' => strval($faker->randomFloat(2, -100, 100)), 'destination_amount' => strval($faker->randomFloat(2, -100, 100)), 'opposing_account_id' => $faker->numberBetween(1, 10), 'source_account_id' => $faker->numberBetween(1, 10), 'opposing_account_name' => $faker->words(3, true), 'description' => $faker->words(3, true), 'source_account_name' => $faker->words(3, true), 'destination_account_id' => $faker->numberBetween(1, 10), 'destination_account_name' => $faker->words(3, true), 'amount' => strval($faker->randomFloat(2, -100, 100)), 'budget_id' => 0, 'category' => $faker->words(3, true), ]; } );