Other solution for dummies :D
$products=Product::where('product_name',$request->product_name)->first();
if($products->name_product == $request->name_product){
$a=$products->quantity + $request->quantity;
$upproduct=Product::find($products->id);
$upproduct->quantity = $a;
$upproduct->save();
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community