Open lubnaO opened 3 years ago
public function index(){ $cartItems=Cart::content(); return view ('cart.index', compact('cartItems')); }
public function addItem($id){ $product=Product::findOrFail($id); $cartItems= Cart::add([ 'id' => $product->id, 'name' => $product->pro_name, 'price' => $product->pro_price, ]); Cart::associate($cartItems->rowId, 'App\Product'); return back(); }
These is in the controller. The issues is (Please supply a valid price.) This issues is show when press button product to add in cart ! Can any one help me !!
public function index(){ $cartItems=Cart::content(); return view ('cart.index', compact('cartItems')); }
These is in the controller. The issues is (Please supply a valid price.) This issues is show when press button product to add in cart ! Can any one help me !!