This issue is related to Laravel 5.2.
When the validation fails, the error messages are not stored in the session when using the web middleware, but works by removing the web middleware or setting the route group this way:
Route::group(['middlewareGroups' => ['web']], function () {
// Routes
}
This bug appears when the laravel updated to version 5.2.
I'm experiencing the same thing, there's no mention of the route group key middlewareGroups in the documentation, it rather mentions middleware could someone clarify the usage please?
Same issue here, I'm investigating a potential fix.
@rosilva please prepend to the issue title [5.2]
Update your RouteServiceProvider... make sure you don't have the web middleware group applied twice to your routes.
@taylorotwell I don't have the web middleware group applied twice (I opened the issue on it).
Recreate it on a fresh Laravel 5.2 installation. Totally fresh.
when using the web middleware. Laravel version 5.2.29
http://prntscr.com/aonjfk
@forexp: The latest 5.2.ish of laravel/laravel includes the web middleware automatically. Can you check your RouteServiceProvider if it's present? https://github.com/laravel/laravel/blob/master/app/Providers/RouteServiceProvider.php#L56
For those who are still experiencing these kind of issues, please take a look at #13000, it's likely to be exactly what you're facing.
I was not able to recreate the problem I encountered with the session data getting reseted randomly on a fresh 5.2 project. Because I have not made a lot of changes to my new project I decided to just start fresh with a new project and not lose anymore time debugging the problems with the old one. I've already lost much more time than I would have lost creating a fresh project and propagating the changes.
I also realised that the person who posted this issue and others who've experienced it were having the problems I too have encountered in issue #13000. But the issue I'm experiencing is really different than this one. But I just jumped ahead on this one because the title fairly matched what I was experiencing.
Anyway, since I have gone ahead with a new project, I'm not going to post an issue about it, because it seems to have been related only to some changes made in my project, although it was very strange because it worked with the PHP server (artisan serve command), it was happening only in homestead.
I think we can close this issue now.
@forexp How did u go about this. I have same issue
@riliwanrabo check issue #13000
Most helpful comment
@forexp: The latest 5.2.ish of laravel/laravel includes the web middleware automatically. Can you check your RouteServiceProvider if it's present? https://github.com/laravel/laravel/blob/master/app/Providers/RouteServiceProvider.php#L56