Hello! For some reasons I can't access data from error bag. I've assigned them to variable in view but I can't display them.
@php
$register_errors = $errors->getBag('register');
echo($register_errors);
@endphp
@foreach($register_errors as $error)
<li>{{ $error }}</li>
@endforeach
echo prints this: {"email":["Email mus\u00ed ma\u0165 spr\u00e1vny form\u00e1t!"],"password":["Heslo mus\u00ed ma\u0165 aspo\u0148 8 charakterov!"],"password_confirmation":["Heslo mus\u00ed ma\u0165 aspo\u0148 8 charakterov!","Hesl\u00e1 sa musia zhodova\u0165!"],"psc":["Pole psc mus\u00ed by\u0165 \u010d\u00edslo."]}
foreach displays nothing, if I try to access them like this: $register_errors->email / $register_errors->email[0] I get no results
I'm sorry for such a newbie question, please bear with me
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community