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