注销而不验证电子邮件 Laravel / 从 AUTH 路由 Laravel 中排除路由

问题描述

我发布这个只是为了让开发人员更容易更快地找到答案,因为我在堆栈溢出时找不到它,所以我只是自己想出来的。

基本上,我在我的路由中添加了电子邮件验证,但是当我尝试注销时,它一直将我重定向到验证页面,这是正常的,因为我做了 replace() 但是当我试图寻找一种排除注销路由的方法时我找到了这个答案

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

但它没有与其他答案一起使用

解决方法

效果很好


Route::post('logout','Auth\LoginController@logout')->name('logout');



Route::group(['verify' => true],function () {


// User Password Reset Routes
Route::get('password/reset','Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
//..... and all the other auth routes

});