【发布时间】:2019-11-26 15:57:48
【问题描述】:
尝试从 Laravel 应用程序发送电子邮件,但 Laravel 抱怨并抛出错误异常
"message": "Route [verification.resend] 未定义。(查看:C:\Users\Elomena\Projects\Clients\Pramopro\resources\views\auth\verify.blade.php)", “异常”:“错误异常”,
按照 laravel 文档 https://laravel.com/docs/5.8/verification#verification-routing 我已经像这样设置了我的 web.php 文件
Auth::routes(['verfiy' => true]);
Route::get('/home', 'HomeController@index')->name('home');
但是我在路线列表中找不到这些路线的任何路线
email/resend
email/verify
email/verify/{id}
为什么会出现这个异常?
【问题讨论】:
-
您的
verify拼写错误。但我在您的路线中没有看到verification.resend定义。 -
修正错字并收到
Swift_TransportException消息Authentication required -
这意味着您没有通过您的 SMTP 提供商进行身份验证,因此您必须在
config/mail.php中进行身份验证设置