Laravel Logout Functionality Causes User Model update

Laravel Logout Functionality Causes User Model update

Alright, we did find the problem for “Laravel Logout Functionality Causes User Model Save”.
The source wasn’t the session as we were focusing on, but that was indeed a middleware that was causing that all.

It was the api middleware group (that had AddQueuedCookiesToResponse, StartSession and ShareErrorsFromSession middlewares, with throttle:60,1 and bindings.
First thing we did that fixed the problem is we copied every middleware from the web middleware group (except VerifyCSRFToken).
When we saw that it was working, we removed the middlewares all by one and noticed the problem.

please remove below code in kernal.php