laravel create的问题

荆弘伟
2023-12-01

orm 中调用create的参数为
[
'user_gateway_id' => $userGatewayID,
'region' => $region,
'device_id' => $deviceID,
'code_num' => $codeNum,
'nickname' => str_replace(PHP_EOL, '', $nickname),
'init_time' => $date,
'update_time' => $date,
]
但是参数为insert into gateway_device (user_gateway_id, device_id, code_num, nickname, init_time, update_time) values (?, ?, ?, ?, ?, ?)==>params{[1085,0,9,"Isis","2017-03-27 14:05:08","2017-03-27 14:05:0
没有region cloumn字段,我找了一段时间,发现是没有在$fillable中添加这个参数
我的锅

转载于:https://www.cnblogs.com/zzx11235/articles/6626585.html

 类似资料: