vendredi 9 avril 2021

How to logout from any function outside a controller action in Laravel 5.5

I have been trying to log out using :

Route::get('/myland',function(){
Auth::logout();
Session::flush();
});

But the user is not being logged out. In my scenario I am obliged to logout that way without using controller I don't know what I am missing.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire