Laravel 5.7 添加了电子邮件验证功能。但在我的项目中,我不使用默认的路由名称,而是出于自己的目的添加了前缀。现在,当我添加以下代码来添加验证路由时,它显示错误。
Auth::routes(['verify' => true]);
错误消息表明verification.verify
路线不存在。在我的项目中哪里可以更新此路线名称?或者使用此功能的唯一方法是遵循默认的身份验证路由名称?
项目源代码可在https://github.com/nasirkhan/laravel-starter/tree/l57
而不是使用Auth::routes(['verify' => true]);
只需使用Auth::routes();
并手动添加这些路由:
Route::get('email/verify', 'Auth\VerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}', 'Auth\VerificationController@verify')->name('verification.verify');
Route::get('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');
然后根据需要定制:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)