diff --git a/src/Otp.php b/src/Otp.php index d823753..108b0f5 100644 --- a/src/Otp.php +++ b/src/Otp.php @@ -56,7 +56,7 @@ public function validate(string $identifier, string $token): object if ($otp instanceof Model) { if ($otp->valid) { $now = Carbon::now(); - $validity = $otp->created_at->addMinutes($otp->validity); + $validity = $otp->created_at->addMinutes((int) $otp->validity); $otp->update(['valid' => false]);