osb/app/Models/ServiceDomain.php
2018-08-11 15:21:15 +10:00

24 lines
414 B
PHP

<?php
namespace App\Models;
use App\Models\Service_Model as Model;
use App\Traits\NextKey;
class ServiceDomain extends Model
{
use NextKey;
protected $table = 'ab_service__domain';
public $timestamps = FALSE;
public function tld()
{
return $this->belongsTo(DomainTld::class,'domain_tld_id');
}
public function getNameAttribute()
{
return sprintf('%s.%s',$this->domain_name,$this->tld->name);
}
}