Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

update and create

public function store(Request $request)
{
$product=new Product;
$product->name=$request['name'];
$product->qty=$request['qty'];
$product->save();
$collection=Collection::findorfail(relationid)
$collection_qty=$collection->qty;
$collection->update([
'qty'=> $collection_qty-$request->qty
])
}

Post a Comment

0 Comments

Ad Code

Responsive Advertisement