Open programmeroscar opened 4 years ago
Darryldecode\Cart\Exceptions\InvalidItemException validation.required https://nnuro.gohidigital.com/admin/retailer/retailercart/2
@return array $item;
* @throws InvalidItemException */ protected function validate($item) { $rules = array( 'id' => 'required', 'price' => 'required|numeric', 'quantity' => 'required|numeric|min:1', 'name' => 'required', ); $validator = CartItemValidator::make($item, $rules); if ($validator->fails()) { **throw new InvalidItemException($validator->messages()->first());** } return $item; } /** * add row to cart collection * * @param $id * @param $item * @return bool */ protected function addRow($id, $item) { if ($this->fireEvent('adding', $item) === false) {
This was when i was adding product to PO cart
Darryldecode\Cart\Exceptions\InvalidItemException validation.required https://nnuro.gohidigital.com/admin/retailer/retailercart/2
@return array $item;