无法在编辑表单中显示数据:laravel

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 助手 class 时,有很多东西在幕后工作。

如果您决定不使用助手 classes,您需要手动填充表单!

它可以看起来像这样:

<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>