Db::table('user') ->where('id', 1) ->update(['name' => 'zhimatong']);
更新多个字段的写法:
Db::table('user') ->where('id', 1) ->update([ 'login_time' => ['exp','now()'], 'login_times' => ['exp','login_times+1'], ]);
本文属原创,转载请注明原文:https://zhimatong.com/jiaocheng/844.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。