From d27bde6047e53f820aa6ee8eefe38c25a909502b Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 22 Jun 2024 18:36:24 +0100 Subject: [PATCH] Added deleted factory for tests Signed-off-by: snipe --- database/factories/UserFactory.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index cb1ccd89b..5c885666d 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -38,6 +38,16 @@ class UserFactory extends Factory ]; } + public function deletedUser() + { + return $this->state(function () { + return [ + 'deleted_at' => $this->faker->dateTime(), + ]; + }); + } + + public function firstAdmin() { return $this->state(function () {