The updateQuantity() method was failing and throwing the error below.
Running pluck(['quantity', 'price_id']) on the result from get(['quantity', 'price_id']) was returning null in the following line
$items = $this->items()->get(['quantity', 'price_id'])->pluck(['quantity', 'price_id'])->toArray();
I'm also not sure you could pass and array to pluck, I think this was added by mistake.
Issue
The
updateQuantity()
method was failing and throwing the error below.Running
pluck(['quantity', 'price_id'])
on the result fromget(['quantity', 'price_id'])
was returning null in the following line$items = $this->items()->get(['quantity', 'price_id'])->pluck(['quantity', 'price_id'])->toArray();
I'm also not sure you could pass and array to
pluck
, I think this was added by mistake.Solution
Removed
pluck(['quantity', 'price_id'])