TP cannot obtain the primary key of the data table when inserting records through the model object
之间
之间 2019-06-27 13:48:50
0
3
1502

TIM图片20190627134635.png

TIM图片20190627134701.png

之间
之间

reply all(3)
赵子云

It’s a problem with the database design. There is no default value for id. Just set the id to increase by itself.

黄埔竹下

Try this: Db::name('user')->insertGetId($data);

殘留の回憶

Look carefully, save is a modification statement, not an insertion

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template