我有以下字段的表格。
只有名称是必需的,其余是可选的
'name','no_of_color','offset_printing_rate','screen_printing_rate','positive_rate','regular_plate_rate','big_plate_rate',
我的模型
protected $fillable = [
'name',
'no_of_color',
'offset_printing_rate',
'screen_printing_rate',
'positive_rate',
'regular_plate_rate',
'big_plate_rate',
];
但是当我不填写可选字段时,它会返回错误
SQL:插入到 table_name (
name
,no_of_color
,offset_printing_rate
,screen_printing_rate
,positive_rate
,regular_plate_rate
,big_plate_rate
,updated_at
,created_at
) 值 (name, ?, ?, ?, ?, ?, ?, 2021-10-09 14:47:36, 2021-10-09 14:47 :36)