Enable editing of supplier products and listing services connected to them
This commit is contained in:
@@ -7,17 +7,19 @@ use App\Models\Product\Phone as ProductVoip;
|
||||
|
||||
final class Phone extends Type implements SupplierItem
|
||||
{
|
||||
protected const category_name = 'Telephone';
|
||||
|
||||
protected $table = 'supplier_phone';
|
||||
|
||||
/* INTERFACES */
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductVoip::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
||||
{
|
||||
return 1; // Monthly
|
||||
}
|
||||
|
||||
public function products()
|
||||
{
|
||||
return $this->hasMany(ProductVoip::class,'supplier_item_id','id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user