verificationUrl($notifiable); // Generate a 6-digit fallback verification code with same TTL as the link $ttl = (int) Config::get('auth.verification.expire', 60); $code = (string) random_int(100000, 999999); Cache::put('email_verify_code:'.$notifiable->getKey(), $code, now()->addMinutes($ttl)); return (new MailMessage) ->subject('Verify Your Email Address') ->view('emails.verify-email', [ 'url' => $verificationUrl, 'user' => $notifiable, 'code' => $code, ]); } }