Skip to content

Commit

Permalink
Add unverified state to UserFactory (laravel#5533)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrd-lewis authored Feb 9, 2021
1 parent 6d082c8 commit eaf7289
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,18 @@ public function definition()
'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,
];
});
}
}

0 comments on commit eaf7289

Please sign in to comment.