| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Type extends Model implements AddressTypeContract |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * The attributes that are mass assignable. |
||
| 22 | * |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $fillable = [ |
||
| 26 | 'name', |
||
| 27 | ]; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Constructor. |
||
| 31 | * |
||
| 32 | * @param array $attributes additional attributes for model initialisation |
||
| 33 | */ |
||
| 34 | public function __construct(array $attributes = []) |
||
| 35 | { |
||
| 36 | parent::__construct($attributes); |
||
| 37 | |||
| 38 | $this->setTable(config('pwweb.localisation.table_names.address_types')); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Obtain the localised name of a country. |
||
| 43 | * |
||
| 44 | * @param string $value Original value of the country |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getNameAttribute($value) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |