Initial refactoring work

This commit is contained in:
Deon George
2018-05-20 22:53:14 +10:00
parent d6cb505e1c
commit feda44db8a
121 changed files with 6601 additions and 602 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServiceDomain extends Model
{
protected $table = 'ab_service__domain';
public function service()
{
return $this->belongsTo(Service::class);
}
public function tld()
{
return $this->belongsTo(DomainTld::class,'domain_tld_id');
}
public function getNameAttribute()
{
return sprintf('%s.%s',$this->domain_name,$this->tld->name);
}
}