| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class CustomerContactPhone extends Model |
||
| 9 | { |
||
| 10 | use HasFactory; |
||
| 11 | |||
| 12 | protected $guarded = ['id', 'updated_at', 'created_at']; |
||
| 13 | protected $hidden = ['created_at', 'updated_at', 'phone_type_id']; |
||
| 14 | protected $appends = ['formatted']; |
||
| 15 | |||
| 16 | /* |
||
| 17 | * Mobile, Work, Home, etc |
||
| 18 | */ |
||
| 19 | 1 | public function PhoneNumberType() |
|
| 20 | { |
||
| 21 | 1 | return $this->hasOne(PhoneNumberType::class, 'phone_type_id', 'phone_type_id'); |
|
| 22 | } |
||
| 23 | |||
| 24 | /* |
||
| 25 | * Get a readable number in a familiar NA Format |
||
| 26 | */ |
||
| 27 | 1 | public function getFormattedAttribute() |
|
| 30 | } |
||
| 31 | } |
||
| 32 |