whereIn('id',[5,123])->update(['pay_merchant_id'=>8]); $from = $this->option('from'); $to = $this->option('to'); $this->change($from,$to); } private function change($from,$to){ DB::table('distribution_channels')->where('pay_merchant_id',$from)->update([ 'pay_merchant_id'=>$to, 'updated_at'=>date('Y-m-d H:i:s') ]); } }