0

It gives me this error, when I use large forms instead of html forms,

settings.blade.php;

 @if (is_array($settings) || is_object($settings))

   @foreach($settings as $set)

      {{ Form::bstext('title', $set->title )}} 
         .
         .
         .
    @endforeach

 @endif     

FormServiceProvider.php

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

and text.blade.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>

Where do i mistake ?

2
  • So $attributes is not an array, as you didn't provide initial value for it. Commented Jul 24, 2017 at 12:13
  • is it neccesary ? even if how can i do that ? (i'm beginner) Commented Jul 24, 2017 at 12:15

1 Answer 1

1

i edited my formserviceprovider and it works.

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

thanks for @u_mulder

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.