Laravel 5.4 array_merge():参数 #2 不是使用组件表单时的数组错误



当我使用大型表单而不是html表单时,它给了我这个错误,

设置.刀片.php;

@if (is_array($settings) || is_object($settings))
@foreach($settings as $set)
{{ Form::bstext('title', $set->title )}} 
.
.
.
@endforeach
@endif     

表单服务提供商.php

Form::component('bstext', 'components.form.text', ['name', 'value', 'attributes']);

和文本刀片.php

<div class="col-md-4">
<div class="form-group">
<label>{{$name}}</label>
{{ Form::text($name, $value, array_merge(['class' => 'form-control'], $attributes)) }}
</div>
</div>

我哪里弄错了?

我编辑了我的表单服务提供商,它可以工作。

Form::component('input_form', 'components.form.input', ['name', 'value', 'attributes'=>[]]);

感谢您的@u_mulder

最新更新