needsEmailVerification()) { return; } $key = 'email-verification:'.hash('sha256', strtolower($user->email)); RateLimiter::attempt($key, 1, function () use ($user): void { try { $user->sendEmailVerificationNotification(); } catch (Throwable $exception) { // Registration is already committed; the user can request another email. report($exception); } }, 60); } }