使用 Laravel 发送邮件时 If you’re having trouble clicking the “:actionText” button, copy and paste the URL below into your web browser 的翻译问题
admin 阅读:88 2024-03-01
项目中用到了 Laravel Breeze 入门套件,参照 Laravel Breeze 中文设置(验证信息、重置密码邮件等)一文完成了本地化设置,将内置的语言改成了中文。但是在实际测试过程中发现有一条翻译没生效,就是邮件内容最下方的一句话:
If you're having trouble clicking the "重设密码" button, copy and paste the URL below into your web browser: https://www.codesou.cn/reset-password/5033569939287e44aa189eb0f9d4be9d3dfb505bb8c92d51b4982ea9c2d532b9?email=nidongde%40www.codesou.cn
最终在一篇国际友人的博客中找到了解决办法:
Laravel 邮件模板默认是 /vendor/laravel/framework/src/illuminate/Notifications/rescoures/views/email.blade.php,我们运行命令:
php artisan vendor:publish --tag=laravel-notifications
将这个模板发布到 /resources/views,然后愉快的在模板里修改吧。

声明
1、部分文章来源于网络,仅作为参考。 2、如果网站中图片和文字侵犯了您的版权,请联系1943759704@qq.com处理!