我输入了JSON数据,因为我想在1个字段上添加多个数据文件或图像:
#attributes: array:3 [▼
"No_RM" => "0932595"
"file_Data_Pasien" => "["file1.pdf"]"
"file_SEP_SBT" => "["file2.pdf","file4.pdf","file3.pdf"]"]
从我的输入中dd。并将保存在数据库中。在此Json中没有“ KEY”,
<form method="post" action="{{url('file')}}" enctype="multipart/form-data">
{{csrf_field()}}
<div class="input-group control-group increment" >
<div class="input-group-btn">
<input type="text" name="No_RM" class="form-control" placeholder="Masukan No Rekam Medis">
<input type="file" name="filename[]" class="form-control" placeholder="Masukan File">
<input type="file" name="filesep[]" class="form-control" placeholder="Masukan File">
<button class="btn btn-success" type="button"><i class="glyphicon glyphicon-plus"></i>Add</button>
</div>
</div>
<div class="clone hide">
<div class="control-group input-group" style="margin-top:10px">
<div class="input-group-btn">
<input type="file" name="filesep[]" class="form-control">
<button class="btn btn-danger" type="button"><i class="glyphicon glyphicon-remove"></i> Remove</button>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary" style="margin-top:10px">Submit</button>
</form>