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
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