laravel-debugbar: Laravel Validation Errors Not Displayed in Session Tab
The validation error messages used to display in the debugbar’s session tab but now it is not visible while other variables are present as they should. But when I dd(session()->all())
. The error bag is there and displays all the validation errors and messages as expected.
I suspect it happened after upgrading to Laravel 5.8 from 5.7. Please Help.
Currently Using Laravel 5.8.14 Debugbar 3.2.3 On WIndows 10
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 20 (1 by maintainers)
Hey @barryvdh any news on this? Would be appreciated to solve this bug 😊
Hello! I found the solution (not brilliant but works) in file
Http/Kernel.php
move Middlewares:from $middlewareGroups => [‘web’=>[/* was here */]] to protected $middleware = [/* now moved to this place */]
and errorBag show in session:
Yes, its only for Debugbar work =)
The problem is that session variables end up in the wrong request.
Suppose I edit some model. First I do a GET request to the Model/Edit route. Then I do a POST request to the Model/Update route. This generates an error, which generates another GET request to the Model/Edit route:
What used to happen (a couple of Laravel versions ago I guess) was that the error messagebag and the old input and other session variables would be visible in Debugbar in the second GET request, which is automatically displayed after the error is generated and you are redirected, because it was the last request of course.
This isn’t the case anymore. They now end up in the POST request, which you manually have to open in Debugbar.
Same here. Laravel 5.8.14 Debugbar 3.2.3 Fedora 29 Php 7.2.14