Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我怎样才能让表单文本为空?_Php_Html_Forms_Laravel - Fatal编程技术网

Php 我怎样才能让表单文本为空?

Php 我怎样才能让表单文本为空?,php,html,forms,laravel,Php,Html,Forms,Laravel,我不知道如何保持表格文本为空是没有结果的。我需要这样的东西 如果没有userCreator=表单文本为空 我的代码 <div class="col-md-4"> <div class="form-group"> {{ Form::label('userCreator','UserCreator') }} @if(isset($userCreator)) @foreach($userCreator as $cs)

我不知道如何保持表格文本为空是没有结果的。我需要这样的东西

如果没有userCreator=表单文本为空

我的代码

<div class="col-md-4">
    <div class="form-group">
        {{ Form::label('userCreator','UserCreator') }}
        @if(isset($userCreator))
        @foreach($userCreator as $cs)
        {{ Form::text('userCreator',$cs->home_lastname,['class'=>'form-control']) }}
        @endforeach
        @else{ {{-- What should i put inside here ? --}}
        }
        @endif
    </div>
</div>

{{Form::label('userCreator','userCreator')}
@如果(isset($userCreator))
@foreach($userCreator作为$cs)
{{Form::text('userCreator',$cs->home\u lastname,['class'=>'Form-control'])}
@endforeach
@否则{{{--我应该在里面放什么?--}
}
@恩迪夫
@if(isset($userCreator)&count($userCreator)>0)
{{Form::label('userCreator','userCreator')}
@foreach($userCreator作为$cs)
{{Form::text('userCreator',$cs->home\u lastname,['class'=>'Form-control'])}
@endforeach
@恩迪夫
@if(isset($userCreator)&count($userCreator)>0)
{{Form::label('userCreator','userCreator')}
@foreach($userCreator作为$cs)
{{Form::text('userCreator',$cs->home\u lastname,['class'=>'Form-control'])}
@endforeach
@恩迪夫
试试这个

<div class="col-md-4">
    <div class="form-group">
        {{ Form::label('userCreator','UserCreator') }}
        @if(!empty($userCreator))
          @foreach($userCreator as $cs)
            {{ Form::text('userCreator',$cs->home_lastname,['class'=>'form-control']) }}
          @endforeach
        @else
            {{ Form::text('userCreator','', ['class'=>'form-control']) }}
        @endif
    </div>
</div>

{{Form::label('userCreator','userCreator')}
@如果(!empty($userCreator))
@foreach($userCreator作为$cs)
{{Form::text('userCreator',$cs->home\u lastname,['class'=>'Form-control'])}
@endforeach
@否则
{{Form::text('userCreator','',['class'=>'Form-control'])}
@恩迪夫
试试这个

<div class="col-md-4">
    <div class="form-group">
        {{ Form::label('userCreator','UserCreator') }}
        @if(!empty($userCreator))
          @foreach($userCreator as $cs)
            {{ Form::text('userCreator',$cs->home_lastname,['class'=>'form-control']) }}
          @endforeach
        @else
            {{ Form::text('userCreator','', ['class'=>'form-control']) }}
        @endif
    </div>
</div>

{{Form::label('userCreator','userCreator')}
@如果(!empty($userCreator))
@foreach($userCreator作为$cs)
{{Form::text('userCreator',$cs->home\u lastname,['class'=>'Form-control'])}
@endforeach
@否则
{{Form::text('userCreator','',['class'=>'Form-control'])}
@恩迪夫

如果没有结果,我不想显示任何内容…@Alexeymezenin请查看更新的代码。如果我理解正确,它会对你有用。如果没有结果,我不想显示任何内容…@Alexeymezenin请查看更新的代码。如果我理解正确的话,它会对你有用的。