I dont understand this :
$this->validate($this->request, $rules)
Where is this code ?
I'm having (another) strange problem with Lumen. When a validation error occurs, Lumen redirects to the previous page with the error messages bag object.
However, the $errors variable, and Session::get('errors') array, does not exist in the destination page.
I've tried both ways of validating.
$this->validate($this->request, $rules);
$v = \Validator::make($this->request->all(), $rules);
if ($v->fails()) { return redirect()->back()->withErrors($v->errors()); }
Sessions are enabled and appear to be working: I can set and retrieve data I set myself. The validation error messages are there in $v->errors() when I print_r just after the validator has run and before the redirect. Any ideas on what I could be doing wrong?
Thanks,
Please or to participate in this conversation.