Using morphTo() on services, added Ezypay payment Import
This commit is contained in:
18
app/Models/Service/Domain.php
Normal file
18
app/Models/Service/Domain.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user