Answer the question
In order to leave comments, you need to log in
How to get all errors from Laravel named array?
Hello! The problem is this. From the controller to the template, I pass a named array with errors, something like this:
if($validator->fails()) {
return Redirect::back()->withErrors($validator, 'login');
}
foreach($errors->login->all() as $error) {
echo $error;
}
Answer the question
In order to leave comments, you need to log in
foreach ($messages->get('email') as $message)
{
//
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question