Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/271.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 Laravel未将值传递给表单(仅在生产中)_Php_Forms_Laravel - Fatal编程技术网

Php Laravel未将值传递给表单(仅在生产中)

Php Laravel未将值传递给表单(仅在生产中),php,forms,laravel,Php,Forms,Laravel,我的申请表里有一张登记表。当我填写值并提交表单时,所有内容都正确地存储在数据库中 现在,当我编辑注册时,除了在复选框或下拉列表中选择的值之外,我可以看到我之前填写的所有值。在当地的环境中有一件奇怪的事情,它工作得非常好。但在生产中,复选框和下拉列表值不显示 这是我的控制器 public function edit(Registration $id) { return view('registrations_edit', ['registration' => $id]); } 这就是我

我的申请表里有一张登记表。当我填写值并提交表单时,所有内容都正确地存储在数据库中

现在,当我编辑注册时,除了在复选框或下拉列表中选择的值之外,我可以看到我之前填写的所有值。在当地的环境中有一件奇怪的事情,它工作得非常好。但在生产中,复选框和下拉列表值不显示

这是我的控制器

public function edit(Registration $id)
{
  return view('registrations_edit', ['registration' => $id]);
}
这就是我的观点

<div class="form-group row">
    {!! Form::label('grund_beanstandung_kommentar', 'Grund Beanstandung Kommentar:', ['class' => 'control-label col-md-3']) !!}
    {!! Form::text('grund_beanstandung_kommentar', $registration->grund_beanstandung_kommentar, ['class' => 'form-control col-md-7']) !!}
</div>
<div class="form-group row">
    {!! Form::label('sachschaeden', 'Sachschaeden:', ['class' => 'control-label col-md-3']) !!}
    <label class="radio-inline">{{ Form::radio('sachschaeden', 1, $registration->sachschaeden === 1 ? true : false ) }} Ja</label>
    <label class="radio-inline">{{ Form::radio('sachschaeden', 0, $registration->sachschaeden === 0 ? true : false ) }} Nein</label>
</div>
<div class="form-group row">
    {!! Form::label('praeparat_im_hause', 'Präparat im Hause:', ['class' => 'control-label col-md-3']) !!}
    <label class="radio-inline">{{ Form::radio('praeparat_im_hause', 1, $registration->praeparat_im_hause === 1 ? true : false ) }} Ja</label>
    <label class="radio-inline">{{ Form::radio('praeparat_im_hause', 0, $registration->praeparat_im_hause === 0 ? true : false ) }} Nein</label>
</div>
<div class="form-group row four-height">
    {!! Form::label('grund_beanstandung', 'Grund Beanstandung:', ['class' => 'control-label col-md-3']) !!}
    <label class="inline">{{ Form::checkbox('grund_beanstandung_verpackung', 1, $registration->grund_beanstandung_verpackung === 1 ? true : false ) }} Verpackung beschädigt/verschmutzt</label><br/>
    <label class="inline">{{ Form::checkbox('grund_beanstandung_geruch', 1, $registration->grund_beanstandung_geruch === 1 ? true : false ) }} Geruch/Geschmack/Aussehen verändert</label><br/>
    <label class="inline">{{ Form::checkbox('grund_beanstandung_transportschaden', 1, $registration->grund_beanstandung_transportschaden === 1 ? true : false ) }} Transportschaden</label><br/>
    <label class="inline">{{ Form::checkbox('grund_beanstandung_anderes', 1, $registration->grund_beanstandung_anderes === 1 ? true : false ) }} Anderes (bitte angeben)</label><br/>
</div>

{!!Form::label('grund_beanstandung_kommentar','grund beanstandung kommentar:',['class'=>'控制标签col-md-3'])
{!!Form::text('grund_beanstandung_kommentar',$registration->grund_beanstandung_kommentar,['class'=>'Form control col-md-7'])
{!!Form::label('sachschaeden','sachschaeden:',['class'=>'控制标签col-md-3'])
{Form::radio('sachschaeden',1,$registration->sachschaeden==1?true:false)}
{Form::radio('sachschaeden',0,$registration->sachschaeden==0?true:false)}Nein
{!!Form::label('praeparat_im_hause','Präparat im hause:',['class'=>'控制标签col-md-3'])
{Form::radio('praeparat_im_hause',1,$registration->praeparat_im_hause==1?true:false)}Ja
{Form::radio('praeparat_im_hause',0,$registration->praeparat_im_hause==0?真:假)}Nein
{!!Form::label('grund_beanstandung','grund beanstandung:',['class'=>'控制标签col-md-3'])
{Form::checkbox('grund_beanstandung_verpackung',1,$registration->grund_beanstandung_verpackung==1?true:false)}verpackung beschädigt/verschmutzt
{Form::checkbox('grund_beanstandung_geruch',1,$registration->grund_beanstandung_geruch==1?true:false)}geruch/Geschmack/Aussehen verändert
{Form::checkbox('grund_beanstandung_transportschaden',1,$registration->grund_beanstandung_transportschaden==1?true:false)}transportschaden
{Form::checkbox('grund_beanstandung_anderes',1,$registration->grund_beanstandung_anderes==1?true:false)}anderes(bite angeben)
textfield从控制器获取值,但其他3个单选按钮和下拉菜单不从控制器获取值

有人知道为什么会发生这样的问题吗

问候
凯文

将你的深度等于
==
更改为双等于
=
。当我在我的刀片模板中使用
==
时,我总是遇到这种麻烦。我唯一能贡献它的是,不知何故,我们的值被转换成一个字符串,我们正在检查一个int,因此,由于这两个类型不同,当检查深度相等时,我们将返回false。

如果您使用
==
而不是
==
,在live服务器上会发生什么?@Taylor Foster谢谢您,伙计,工作正常!!!!!!你救了我工作日的最后一天:DGreat!我将添加它作为答案=]