2
Good morning.
In need to insert/update the data from a table of my database, however I do not know the columns that can contain within this table, because the system is very flex. I created a modal with $fillable = ['*'];
to try to update only the cases that pass the input, but is not inserting anything. Follow the codes below.
Note: the same input data is the table data.
Modal:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Request;
class ChamadosChamados extends Model
{
protected $table = 'chamados_chamados';
public $timestamps = false;
protected $fillable = ['*'];
}
DD of the input.
array:15 [▼
"_token" => "J05hMfB9PtZ6uoVdpKPNc29mZcN4KXgqkpVn71Y0"
"equipe" => "SANTANDER - RCI MOROSO"
"tipo" => "1"
"categoria" => "1"
"modelo_formulario" => "1"
"segmento" => "LEVES PR"
"dias_atraso" => "1"
"contrato" => "1"
"nome_financiado" => "1"
"endereco_financiado" => "1"
"uf" => "PA"
"cidade" => "AURORA"
"telefone_acordo" => "1"
"telefone_agendamento" => "1"
"observacao_required" => "1"
]
Closed friend, I did as you said. I passed the empty $guarded and now is entering and updating only the cases that are in the form. Thanks
– Luiz Gustavo Costa Ceolin