-1

I'm only posting this to make it easy for fellow devs to find the answer more quickly because I couldn't find it on stack overflow so I just figured it out for myself.

basically, I added email verification to my routes but when I try to logout it kept redirecting me to the verification page which is normal because I did Auth::routes(['verify' => true]); but when I tried to look for a way to exclude logout route I found this answer


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

});

but it didn't work along with other answers

anouar es-sayid
  • 355
  • 5
  • 11

1 Answers1

0

this worked just fine

Auth::routes(['verify' => true]);
/// excluded routes  
Route::get('logout', 'Auth\LoginController@logout')->name('logout');
anouar es-sayid
  • 355
  • 5
  • 11