Enable editing of supplier products and listing services connected to them
This commit is contained in:
@@ -7,6 +7,8 @@ use App\Models\Product\Email as ProductEmail;
|
||||
|
||||
final class Email extends Type implements SupplierItem
|
||||
{
|
||||
protected const category_name = 'Email Hosting';
|
||||
|
||||
protected $table = 'supplier_email';
|
||||
|
||||
/* INTERFACES */
|
||||
@@ -16,8 +18,8 @@ final class Email extends Type implements SupplierItem
|
||||
return 4; // Yearly
|
||||
}
|
||||
|
||||
public function types()
|
||||
public function products()
|
||||
{
|
||||
return $this->belongsToMany(ProductEmail::class,$this->table,'id','id','id','supplier_item_id');
|
||||
return $this->hasMany(ProductEmail::class,$this->table,'supplier_item_id','id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user