@foreach($pessoaFisica->telefones as $tel)
<div class="col-sm-6">
<label for="telefone" class="col-sm-6 control-label">Telefone:</label>
<input type="tel" class="form-control" name="numero[]" id="numero"
placeholder="Telefone - obrigatório"
value="{{isset($tel->numero) ? $tel->numero : null}}">
</div>
@endforeach
This gives you a list of phones as follows:
And now I'm trying to get the two fields to edit in the table, and I'm trying to do this as follows:
$dados = $request->input('numero');
$this->telefone->where('id_pessoa', $idPessoa)->update($dados);
But an error is occurring. I know this is happening because it is a list but I do not know how to insert it in bulk at one time or another.