Closed joarobles closed 10 years ago
I can´t get an item by its ID, I'm trying to remove it from the cart but I obtain:
Call to a member function toArray() on a non-object
I can reproduce the issue like this:
foreach (Cart::contents() as $item) { \Log::info ('ID: '. $item->id); // Outputs "42" (integer) \Log::info ('Item', Cart::item ($item->id)->toArray ()); // error }
Also I can't remove the item using
Cart::item((string) $id)->remove()
I can´t get an item by its ID, I'm trying to remove it from the cart but I obtain:
I can reproduce the issue like this:
Also I can't remove the item using