2017-09-13 42 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);