osb/app/Models/Service/Adsl.php

21 lines
468 B
PHP
Raw Normal View History

2018-05-20 12:53:14 +00:00
<?php
namespace App\Models\Service;
2018-05-20 12:53:14 +00:00
class Adsl extends \App\Models\Base\ServiceType
2018-05-20 12:53:14 +00:00
{
// @todo column service_id can be removed.
2018-05-20 12:53:14 +00:00
protected $table = 'ab_service__adsl';
2018-11-21 03:37:17 +00:00
public function getFullNameAttribute()
{
return ($this->service_number AND $this->service_address)
? sprintf('%s: %s',$this->service_number, $this->service_address)
: $this->name;
}
2018-05-20 12:53:14 +00:00
public function getNameAttribute()
{
2018-08-11 05:09:41 +00:00
return $this->service_number ?: $this->service_address;
2018-05-20 12:53:14 +00:00
}
}