public function Depth() { if ($this->ProductVariation()->Depth) { return $this->ProductVariation()->Depth; } return $this->Product()->Depth; }