mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 18:08:06 +00:00
22 lines
463 B
PHP
22 lines
463 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PhoneCountry extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $incrementing = false;
|
|
protected $visible = ['code', 'country_code', 'activated'];
|
|
protected $casts = [
|
|
'activated' => 'boolean',
|
|
];
|
|
|
|
public function getNameAttribute(): ?string
|
|
{
|
|
return getCountryCodes()[$this->attributes['code']];
|
|
}
|
|
}
|