php - Argument 2 passed to App\Cart::add() must be an instance of Illuminate\Http\Request -
i'm stuck this. i'm gonna request ?
public function add($item, request $request, $id) { $storeditem = [ 'qty' => 0 , 'unit_price' => $item->unit_price , 'item' => $item ]; if ($this->items) { if(array_key_exists($id, $this->items)) { $storeditem = $this->items[$id]; } } $storeditem['qty']++; $storeditem['unit_price'] = $item->unit_price * $storeditem['qty']; $this->items[$id] = $storeditem; $this->totalqty++; $this->totalprice += $item->unit_price; }
Comments
Post a Comment