Laravel helpers.php第519行中的ErrorException:htmlspecialchars()要求参数1为字符串,对象为给定值
上面写着:(View:C:\xampp\htdocs\lar\resources\views\welcome.blade.php) 我的欢迎代码是:Laravel helpers.php第519行中的ErrorException:htmlspecialchars()要求参数1为字符串,对象为给定值,laravel,laravel-5.2,Laravel,Laravel 5.2,上面写着:(View:C:\xampp\htdocs\lar\resources\views\welcome.blade.php) 我的欢迎代码是: @if (count($errors) > 0) <div class="row"> <div class="col-md-6"> <ul> @foreach($errors -> all() as $error)
@if (count($errors) > 0)
<div class="row">
<div class="col-md-6">
<ul>
@foreach($errors -> all() as $error)
<li>{{$errors}}</li>
@endforeach
</ul>
</div>
</div>
@endif
@if(计数($errors)>0)
@foreach($errors->all()作为$error)
- {{$errors}}
@endforeach
@恩迪夫
这里出了什么问题?在foreach循环中应该是$error而不是$errors。愚蠢的错误我知道,无论如何,谢谢:)