表单验证那块,一模一样的写法,在5.1整个流程都没问题,在5.2也能验证,但是错误信息返回那块就不对了,一直报错:
ErrorException in 93adbe7975c0acdcebc1a85f21528dd2f31a086c.php line 122:
Undefined variable: errors (View: F:\m3-w7\resources\views\user\register.blade.php)
即:
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{ $error }</li>
@endforeach
</ul>
</div>
@endif
没有$errors这个变量,那5.2的错误信息是通过什么字段返回的呢?