1

After upgrading Laravel 5.7 to 5.8 my Validation Error message doesnt seems to work after redirect

$validator = Model::validate($request);
if ($validator->fails()) {
 throw ValidationException::withMessages($validator->messages()->toArray());
}

I try do dd($request->all()); It does send the array field that I required and I was not sure what the real problem cause laravel community doesnt seems to have problem with this after searching throughout article

Daniel
  • 155
  • 1
  • 2
  • 15

1 Answers1

0

Refer to this answer from Ningappa, remove or move the

'\Illuminate\Session\Middleware\StartSession::class' '\Illuminate\View\Middleware\ShareErrorsFromSession::class'

from $middlewaregroup and place it under $middleware, sometimes it is already there then just removed it.

Laravel session Flash Message Not working

Daniel
  • 155
  • 1
  • 2
  • 15