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
ShareErrorsFromSession middlewares, with
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
protected $middlewareGroups = [
'web' => [
'api' => [