laravel字段自增/自减

时间:2017-04-01 19:05:40   收藏:0   阅读:601

 

DB::table(‘users‘)->increment(‘votes‘);
DB::table(‘users‘)->increment(‘votes‘, 5);
DB::table(‘users‘)->decrement(‘votes‘);
DB::table(‘users‘)->decrement(‘votes‘, 5);

原文:http://www.cnblogs.com/begintime/p/6657155.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!