Product Model optimisation
This commit is contained in:
@@ -37,31 +37,6 @@ abstract class Type extends Model
|
||||
return $this->hasOne(static::SupplierModel,'id','supplier_item_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
|
||||
* @deprecated - can this be replaced with product->supplied->category?
|
||||
*/
|
||||
final public function getCategoryAttribute(): string
|
||||
{
|
||||
abort(500,'use product->supplied->category_name');
|
||||
return strtolower((new \ReflectionClass($this))->getShortName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a friendly name for this product, used for display
|
||||
*
|
||||
* @return string
|
||||
* @deprecated - can this be replaced with product->supplied->category_name
|
||||
*/
|
||||
final public function getCategoryNameAttribute(): string
|
||||
{
|
||||
abort(500,'use product->supplied->category_name');
|
||||
return static::category_name;
|
||||
}
|
||||
|
||||
/* METHODs */
|
||||
|
||||
final function normalizeBillingInterval(): int
|
||||
|
Reference in New Issue
Block a user