I'm trying to save the data from the protocol checklist, but the following error is occurring at the time of saving:
Call to undefined method Symfony \ Component \ HttpFoundation \ ParameterBag :: save ()
Thefollowingimageshowstheprotocolchecklistmodelandthesecondimageistherequestvariabledebug.Thisdebugpresentshowthedataisstructured.
Debugofthevariable"request", data coming from the modal checklist protocol. The data marked in yellow is the variables of the checklist and the data marked in red is the id of the array item.
Loopresponsiblefordisplayingprotocolchecklistdata:
@foreach($checklistsProtocolosas$checklistProtocolo)<tr><td><inputtype="text" class="form-control" id="item" name="item[]" value="{{$checklistProtocolo->item}}" size ="2"></td>
<td>{{$checklistProtocolo->descricao_item}}</td>
<input type="hidden" id="item_descricao_id" name="item_descricao_id[{{$checklistProtocolo->item}}][]" value="{{$checklistProtocolo->item_descricao_id}}">
<td><input type="checkbox" id="sim_nao" name="sim_nao[{{$checklistProtocolo->item}}][]" {{$checklistProtocolo->sim_nao == null ? '' : 'checked'}}></td>
<td><input type="checkbox" id="nao_atende" name="nao_atende[{{$checklistProtocolo->item}}][]" {{$checklistProtocolo->nao_atende == null ? '' : 'checked'}}></td>
<td><input type="date" id="dt_validade" name="dt_validade[{{$checklistProtocolo->item}}][]" value="{{$checklistProtocolo->dt_validade}}"></td>
<td><input type="text" id="pagina_documento" name="pagina_documento[{{$checklistProtocolo->item}}][]" value="{{$checklistProtocolo->pagina_documento}}" size ="1"></td>
<td><input type="text" id="observacao" name="observacao[{{$checklistProtocolo->item}}][]" value="{{$checklistProtocolo->observacao}}" size ="1" style="width: 300px; height: 60px"></td>
</tr>
@endforeach
Controller protocol checklist registration method:
public function cadastroChecklistProtocolo(Request $request)
{
dd($request->request);
//Deletar a tabela de checklist_protocolo
$checklistsProtocolos = ChecklistProtocolo::where('projeto_id','=', $request->projeto_id)->delete();
//Recebe os dados do modal Checklist Protocolo
$checklistProtocolo = $request->request;
$checklistProtocolo->save();//está ocorrendo um problema no momento de salvar os dados
}