osb/app/Models/ServiceDomain.php

20 lines
346 B
PHP
Raw Normal View History

2018-05-20 12:53:14 +00:00
<?php
namespace App\Models;
2018-07-16 05:06:43 +00:00
use App\Models\Service_Model as Model;
2018-05-20 12:53:14 +00:00
class ServiceDomain extends Model
{
protected $table = 'ab_service__domain';
public function tld()
{
return $this->belongsTo(DomainTld::class,'domain_tld_id');
}
public function getNameAttribute()
{
return sprintf('%s.%s',$this->domain_name,$this->tld->name);
}
}