Using morphTo() on services, added Ezypay payment Import
This commit is contained in:
21
app/Models/Service/Adsl.php
Normal file
21
app/Models/Service/Adsl.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
class Adsl extends \App\Models\Base\ServiceType
|
||||
{
|
||||
// @todo column service_id can be removed.
|
||||
protected $table = 'ab_service__adsl';
|
||||
|
||||
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 ?: $this->service_address;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user