[英]failing to display the data in the edit form : laravel
當我使用這樣的模型時:
<div class="form-group col-sm-6">
{!! Form::label('nop3', 'Nop3:') !!}
{!! Form::text('nop3', null, ['class' => 'form-control']) !!}
</div>
數據nop3可以顯示在文本字段nop3中: https ://postimg.org/image/x4ar40u7b/
但是,我使用這樣的模型:
<div class="form-group col-sm-6">
<div class="form-group col-sm-3">
NOMOR P3
</div>
<div class="form-group col-sm-9">
<input type="text" name="nop3" class="form-control">
</div>
</div>
數據nop3無法顯示在文本字段nop3中: https ://postimg.org/image/jin2ns0y9/
而這兩個模型相同
如果有人可以向我解釋?
您認為問題中顯示的兩種方法相同的假設是錯誤的!
使用Form
helper類時,幕后有很多事情要做。
如果決定不使用幫助器類,則需要手動填充表單!
它看起來可能像這樣:
<div class="form-group col-sm-6">
<div class="form-group col-sm-3">
NOMOR P3
</div>
<div class="form-group col-sm-9">
<input type="text" name="nop3" class="form-control" value="{{$nop3}}">
</div>
</div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.