product_id,$this->tld->name); } public function products() { return $this->hasMany(ProductDomain::class,'supplier_item_id','id'); } /* STATIC */ /** * Determine the owner of the name servers used for the domain * */ public static function nameserver_name(Collection $nameservers): string { foreach (config('nameservers') as $key => $ns) { if ($nameservers->diff($ns)->count() < count($ns)) return $key; } return 'custom'; } /* RELATIONS */ public function tld() { return $this->belongsTo(TLD::class); } }