When I try to login show me token error. I have checked token in view form it\'s right and when comment \\App\\Http\\Middleware\\VerifyCsrfToken::class
,
in the
Well I think all missed the CSRF Token creation while logout!
As I have solved out the problem.
Just add below code to the header.
And if you use {!!Form::open()!!}
it will automatically create the token. Otherwise you can use
or
{!! csrf_field() !!}
just immediate form open.
Most importantly use return Redirect::to('');
on controller function or a page reload or ajax reload that the token can be created!
Like:
public function logout() {
Session::flush();
Auth::logout();
return Redirect::to('/');
}
For ensure the token properly created or not check "view page source" on browser and it will shows like:
I think it might solve the problem as it worked for me!