osb/app/Models/Service/Domain.php

18 lines
342 B
PHP

<?php
namespace App\Models\Service;
class Domain extends \App\Models\Base\ServiceType
{
protected $table = 'ab_service__domain';
public function tld()
{
return $this->belongsTo(\App\Models\DomainTld::class,'domain_tld_id');
}
public function getNameAttribute()
{
return sprintf('%s.%s',$this->domain_name,$this->tld->name);
}
}