本文介绍了Laravel 5.7电子邮件验证错误,未定义路由[verification.verify]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Laravel 5.7中实施电子邮件验证.我已经在 User 模型上实现了 MustVerifyEmail .

I am trying to implement email verification in Laravel 5.7. I have implemented MustVerifyEmail on User model.

class User extends Authenticatable implements MustVerifyEmail 
{ 
}

但是注册后,我收到此错误未定义路由[verification.verify] .

But after registration I got this error Route [verification.verify] not defined.

我在此缺少什么?请指导?

What I am missing in this? Please guide?

推荐答案

Laravel包含 Auth \ VerificationController 类,该类包含发送验证链接和验证电子邮件的必要逻辑.要为此控制器注册必要的路由,请将 verify 选项传递给 Auth :: routes 方法:

Laravel includes the Auth\VerificationController class that contains the necessary logic to send verification links and verify emails. To register the necessary routes for this controller, pass the verify option to the Auth::routes method:

Auth::routes(['verify' => true]);

您可以在此处阅读更多信息: https://laravel.com/docs/5.7/verification

You can read more information here : https://laravel.com/docs/5.7/verification

这篇关于Laravel 5.7电子邮件验证错误,未定义路由[verification.verify]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 17:49