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;
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
2017-01-30 20:40:43 +01:00
|
|
|
* Class Country.
|
2016-07-03 18:11:58 +02:00
|
|
|
*/
|
2015-03-16 22:45:25 +01:00
|
|
|
class Country extends Eloquent
|
|
|
|
{
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2015-07-02 22:21:29 +02:00
|
|
|
public $timestamps = false;
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
2015-12-07 14:34:55 +01:00
|
|
|
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',
|
2015-12-07 14:34:55 +01:00
|
|
|
];
|
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
2015-12-07 14:34:55 +01:00
|
|
|
protected $casts = [
|
|
|
|
'swap_postal_code' => 'boolean',
|
|
|
|
'swap_currency_symbol' => 'boolean',
|
|
|
|
];
|
2015-07-02 22:21:29 +02:00
|
|
|
|
2016-07-03 18:11:58 +02:00
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2017-01-30 17:05:31 +01:00
|
|
|
public function getName()
|
2015-07-02 22:21:29 +02:00
|
|
|
{
|
2018-01-21 07:55:40 +01:00
|
|
|
return trans('texts.country_' . $this->name);
|
2015-07-02 22:21:29 +02:00
|
|
|
}
|
2015-03-16 22:45:25 +01:00
|
|
|
}
|