Using morphTo() on services, added Ezypay payment Import
This commit is contained in:
20
app/Models/Service/Voip.php
Normal file
20
app/Models/Service/Voip.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
class Voip extends \App\Models\Base\ServiceType
|
||||
{
|
||||
protected $table = 'ab_service__voip';
|
||||
|
||||
public function getFullNameAttribute()
|
||||
{
|
||||
return ($this->service_number AND $this->service_address)
|
||||
? sprintf('%s: %s',$this->service_number, $this->service_address)
|
||||
: $this->name;
|
||||
}
|
||||
|
||||
public function getNameAttribute()
|
||||
{
|
||||
return $this->service_number;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user