Level 60
$totalcost = $order['pay_amount'] - $order['discount'] ;
$order['total_cost'] = $totalcost;
1 like
I want to add two column (pay_amount and discount) and put that result in another column. Controller for update function:
$order['shipping_zip'] = $request->shipping_zip;
$order['order_note'] = $request->order_note;
$order['discount'] = $request->discount;
$totalcost = $order['pay_amount'] - $order['discount'] ;
$order['total_cost'] = $request->$totalcost;
$order->save();
how can i do that is this one is right?
$totalcost = $order['pay_amount'] - $order['discount'] ;
$order['total_cost'] = $request->$totalcost;
$totalcost = $order['pay_amount'] - $order['discount'] ;
$order['total_cost'] = $totalcost;
Please or to participate in this conversation.