morphOne(Product::class, null,'model','model_id'); } /** * This will return the category of the product (eg: domain, hosting, etc) which is the basis for all * other logic of these types. * * @return string */ final public function getCategoryAttribute(): string { return strtolower((new \ReflectionClass($this))->getShortName()); } /** * Return a friendly name for this product, used for display * * @return string */ final public function getCategoryNameAttribute(): string { return static::category_name; } }