Laravel 5.7 email verification error, route [verification.verify] not defined(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
{
}
但注册后我收到此错误Route [verification.verify] not defined.
But after registration I got this error Route [verification.verify] not defined.
我缺少什么?请指导?
推荐答案
Laravel 包含 AuthVerificationController 类,该类包含发送验证链接和验证电子邮件的必要逻辑.要为此控制器注册必要的路由,请将 verify 选项传递给 Auth::routes 方法:
Laravel includes the AuthVerificationController 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] 未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Laravel 5.7 邮件验证错误,路由 [verification.verify]
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
