public function getDescriptionAttribute($value) { if ($this->masterProduct) { return $this->masterProduct->description; } else { return $value; } }