3
I’m hoping that in mine layout
blade
echo
only if the variable $errors
is defined:
@section('mensagens')
<div class="container">
<div class="row">
<div class="col-md-2"></div>
{{ isset($errors) ?
'<div class="col-md-8 alert alert-danger">'
$errors->first('prontuario')
$errors->first('senha')
'</div>'
:
''
}}
<div class="col-md-2"></div>
</div>
</div>
@show
How do I get him to just show this div
class alert-danger
if the variable $errors
of my form is defined?
It worked!!! It was exactly the way I wanted it, only showing up the div when I made the mistake. Thanks!
– WitnessTruth
Not at all! We’re here to help each other! ;)
– Kayo Bruno