osb/app/Models/ServiceAdsl.php
2018-11-21 14:37:17 +11:00

26 lines
508 B
PHP

<?php
namespace App\Models;
use App\Models\Service_Model as Model;
use App\Traits\NextKey;
class ServiceAdsl extends Model
{
use NextKey;
protected $table = 'ab_service__adsl';
public $timestamps = FALSE;
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;
}
}