I loop on a Form::label and text but, the name and the label of label and text is bad. Why the name, id is not => t1 t2 t3 .. t10 ?? I write this:
@for ($i = 1; $i < 11; $i++)
<?php $item_name = 't' . $i; ?>
@if ($uneCategorie->$item_name != null)
<div class="col-lg-3">
<div class="form-group">
{!! Form::label('{{$uneCategorie->$item_name}}', '{{$uneCategorie->$item_name}}') !!}
{!! Form::text('{{$uneCategorie->$item_name}}', null,array('maxlength' => 255, 'class'=>'form-control' )) !!}
</div>
@if ($errors->has('{{$uneCategorie->$item_name}}'))
<div class="alert alert-danger" role="alert">
<ul>
@foreach ($errors->get('{{$uneCategorie->$item_name}}') as $message)
<li>{{$message}}</li>
@endforeach
</ul>
</div>
@endif
</div>
@endif
@endfor
And i've this:
<label for="<?php echo e($uneCategorie->$item_name); ?>"><?php echo e($uneCategorie->$item_name); ?></label>
<input maxlength="255" class="form-control" name="<?php echo e($uneCategorie->$item_name); ?>" type="text" id="<?php echo e($uneCategorie->$item_name); ?>">