Enable editing of supplier products and listing services connected to them
This commit is contained in:
@@ -8,6 +8,8 @@ use App\Models\TLD;
|
||||
|
||||
final class Domain extends Type implements SupplierItem
|
||||
{
|
||||
protected const category_name = 'Domain Name';
|
||||
|
||||
protected $table = 'supplier_domain';
|
||||
|
||||
/* INTERFACES */
|
||||
@@ -22,9 +24,9 @@ final class Domain extends Type implements SupplierItem
|
||||
return sprintf('%s: %s',$this->product_id,$this->tld->name);
|
||||
}
|
||||
|
||||
public function types()
|
||||
public function products()
|
||||
{
|
||||
return $this->belongsToMany(ProductDomain::class,$this->table,'id','id','id','supplier_item_id');
|
||||
return $this->hasMany(ProductDomain::class,'supplier_item_id','id');
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
Reference in New Issue
Block a user