2017-09-13 43 views

回答

0

试试这个 -

DB::table('employee')->increment('bonus', 10); 

你可以这样做,以及:

DB::table('employee') 
    ->where('rowID', 1) // if you to add in a perticular table else comment it for updating entire column's value by adding 10 in it. 
    ->update([ 
     'bonus' => DB::raw('bonus + 10'), 
    ]); 

希望这会帮助你。

1

试试这个:

DB::table('employee')->increment('bonus', 10);