updat
This commit is contained in:
@@ -19,6 +19,8 @@ class Product extends Model
|
||||
'slug',
|
||||
'short_description',
|
||||
'description',
|
||||
'thumbnail',
|
||||
'gallery',
|
||||
'setup_fee',
|
||||
'trial_days',
|
||||
'cpu',
|
||||
@@ -39,6 +41,7 @@ class Product extends Model
|
||||
'is_active' => 'boolean',
|
||||
'is_unlimited' => 'boolean',
|
||||
'published_at' => 'date',
|
||||
'gallery' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -58,6 +61,16 @@ class Product extends Model
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Relationship: Product has many Control Panels (for Hosting)
|
||||
*/
|
||||
public function controlPanels()
|
||||
{
|
||||
return $this->belongsToMany(ControlPanel::class, 'product_control_panel')
|
||||
->withPivot(['price_modifier', 'is_default'])
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Relationship: Product has many pricings
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user