Update row of database on laravel

Posted 8 months ago by graffislife

I was hoping to change all column payment to 1 f the user order and inventory ID is the same. This is my code. Thanks in advance

  
if($order->user_order_id == $order->inventory->user_id){
DB::table('orders')->update(array('payment' => 1));
} 

Please sign in or create an account to participate in this conversation.