Generate firstName instead of name in User model's factory
MODIFY
database/factories/ModelFactory.php
database/factories/ModelFactory.php
@@ -9,7 +9,7 @@ use App\Spending;
$factory->define(User::class, function (Generator $faker) {
return [
'currency_id' => $faker->numberBetween(1, 3),
- 'name' => $faker->name,
+ 'name' => $faker->firstName,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10)
@@ -18,7 +18,7 @@ $factory->define(User::class, function (Generator $faker) {
$factory->define(Space::class, function (Generator $faker) {
return [
- 'name' => $faker->firstName() . '\'s Space'
+ 'name' => $faker->firstName . '\'s Space'
];
});

Generate firstName instead of name in User model's factory