From b8b4505f33764f3642a4ea1dbc4d4237e5da07da Mon Sep 17 00:00:00 2001 From: Manus AI Date: Mon, 23 Feb 2026 21:11:29 -0500 Subject: [PATCH] fix: Set default status to 'pending' for verification codes The VerificationCode model was creating records with NULL status because the generateFor() method never initialized the status field. This caused issues when querying for verification codes with: ->where('status', 'pending') Now all verification codes are created with status = 'pending' by default, which is the expected behavior for newly generated codes. Fixes verification flow for email and SMS verification codes. --- src/Models/VerificationCode.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Models/VerificationCode.php b/src/Models/VerificationCode.php index 9f616d5..dc80498 100644 --- a/src/Models/VerificationCode.php +++ b/src/Models/VerificationCode.php @@ -88,8 +88,9 @@ public function subject() */ public static function generateFor($subject = null, $for = 'general_verification', $save = true) { - $verifyCode = new static(); - $verifyCode->for = $for; + $verifyCode = new static(); + $verifyCode->for = $for; + $verifyCode->status = 'pending'; // Set default status if ($subject) { $verifyCode->setSubject($subject, false);