public function refreshCost() { if ($this->product->cost === null) { return; } $this->cost = $this->product->cost; }