Add unverified state to UserFactory (#5533)

This commit is contained in:
Jared Lewis 2021-02-09 15:52:23 -05:00 committed by GitHub
parent 6d082c81e5
commit eaf7289523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,4 +30,18 @@ class UserFactory extends Factory
'remember_token' => Str::random(10),
];
}
/**
* Define the model's unverified state.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
public function unverified()
{
return $this->state(function (array $attributes) {
return [
'email_verified_at' => null,
];
});
}
}