1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Models/Country.php

47 lines
720 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Models;
2015-03-16 22:45:25 +01:00
2015-03-26 07:24:02 +01:00
use Eloquent;
/**
2017-01-30 20:40:43 +01:00
* Class Country.
*/
2015-03-16 22:45:25 +01:00
class Country extends Eloquent
{
/**
* @var bool
*/
2015-07-02 22:21:29 +02:00
public $timestamps = false;
2015-03-16 22:45:25 +01:00
/**
* @var array
*/
protected $visible = [
'id',
'name',
'swap_postal_code',
'swap_currency_symbol',
'thousand_separator',
2017-01-30 20:40:43 +01:00
'decimal_separator',
2018-02-07 11:39:30 +01:00
'iso_3166_2',
2017-09-05 15:37:19 +02:00
'iso_3166_3',
];
/**
* @var array
*/
protected $casts = [
'swap_postal_code' => 'boolean',
'swap_currency_symbol' => 'boolean',
];
2015-07-02 22:21:29 +02:00
/**
* @return mixed
*/
2017-01-30 17:05:31 +01:00
public function getName()
2015-07-02 22:21:29 +02:00
{
return trans('texts.country_' . $this->name);
2015-07-02 22:21:29 +02:00
}
2015-03-16 22:45:25 +01:00
}