public function definition()
{
return [
'name' => $this->faker->name,
'email' => $this->faker->unique()->safeEmail,
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
'created_by' => 3, // Stamped as 3
'updated_by' => 3, // Stamped as NULL
];
}
Summary of problem or feature request
Setting the
updated_byfield in a Factory has no effect as the value is overwritten by null on save due to there being no currently authenticated user.Code snippet of problem
System details