Laravel自定义电子邮件验证
我正在尝试自定义电子邮件验证电子邮件。 在文件Laravel自定义电子邮件验证,laravel,Laravel,我正在尝试自定义电子邮件验证电子邮件。 在文件\vendor\laravel\framework\src\illumb\Auth\Notifications\VerifyEmail.php 我可以看到: return (new MailMessage) ->subject(Lang::get('Verify Email Address')) ->line(Lang::get('Please click the button below to v
\vendor\laravel\framework\src\illumb\Auth\Notifications\VerifyEmail.php
我可以看到:
return (new MailMessage)
->subject(Lang::get('Verify Email Address'))
->line(Lang::get('Please click the button below to verify your email address.'))
->action(Lang::get('Verify Email Address'), $verificationUrl)
->line(Lang::get('If you did not create an account, no further action is required.'));
}
{
"Verify Email Address" : "Bevestig uw email adres"
}
我的应用程序的语言是nl,到目前为止,我所有的翻译工作。
我在\resources\lang\nl
中添加了一个文件messages.php,内容如下:
<?php
return [
'Verify Email Address' => 'Bevestig uw email adres',
];
我找到了解决方案,我必须添加一个文件\resources\lang\nl\nl.json
,并添加以下内容:
return (new MailMessage)
->subject(Lang::get('Verify Email Address'))
->line(Lang::get('Please click the button below to verify your email address.'))
->action(Lang::get('Verify Email Address'), $verificationUrl)
->line(Lang::get('If you did not create an account, no further action is required.'));
}
{
"Verify Email Address" : "Bevestig uw email adres"
}
现在它按预期工作。我找到了解决方案,我必须添加一个文件\resources\lang\nl\nl.json
,并添加以下内容:
return (new MailMessage)
->subject(Lang::get('Verify Email Address'))
->line(Lang::get('Please click the button below to verify your email address.'))
->action(Lang::get('Verify Email Address'), $verificationUrl)
->line(Lang::get('If you did not create an account, no further action is required.'));
}
{
"Verify Email Address" : "Bevestig uw email adres"
}
现在它如预期的那样工作。看看这个@aimme,它基本上说不要这样做,但我不明白为什么不这样做,因为我只支持一种语言。是的,只是觉得它可能对你有帮助。所以和你分享:)看看这个@aimme,它基本上说不要做,但我不明白为什么不做,因为我只支持一种语言。是的,我只是觉得它可能对你有帮助。所以与您分享:)