osb/app/Models/Service/Adsl.php

27 lines
545 B
PHP

<?php
namespace App\Models\Service;
use App\Traits\NextKey;
class Adsl extends \App\Models\Base\ServiceType
{
use NextKey;
const RECORD_ID = 'service__adsl';
// @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;
}
}