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:Model.php 中的 MassAssignmentException 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01