Laravel 8:如何翻译双因素认证默认消息



我正在使用Laravel Fortify,我想翻译这个默认消息怎么做?

提供的双因素认证码无效。

我发现这个消息在这个地址,但这是源,我不能改变它

src/Http/响应/FailedTwoFactorLoginResponse.php

public function toResponse($request)
{
$message = __('The provided two factor authentication code was invalid.');
if ($request->wantsJson()) {
throw ValidationException::withMessages([
'code' => [$message],
]);
}
return redirect()->route('login')->withErrors(['email' => $message]);
}

你安装和开发了本地化吗?似乎消息只需要locale。对于应用语言的东西

最新更新