0

On my project, I did a custom helper like below:

Best practices for custom helpers on Laravel 5

After that, my validations has been disabled. The validations happens normally on server side, withErrors($validator) method, but in my view blade the variable $errors is always empty.

How can I enable the laravel's validation again?

enter image description here

Community
  • 1
  • 1
Vinicius Maciel
  • 101
  • 2
  • 12

1 Answers1

0

I found a solution here: http://laravel.io/forum/03-28-2016-errors-variable-empty-after-failed-validation

I finally found a fix, and I want to share it in case anyone else ends up here with the same problem. In app\Http\Kernel.php I moved \Illuminate\Session\Middleware\StartSession::class from the 'web' $middlewareGroups to $middleware. I have no idea why this fixed the problem, which worries me a bit. But hey... it's working.

Vinicius Maciel
  • 101
  • 2
  • 12