40 lines
853 B
PHP
40 lines
853 B
PHP
<?php
|
|
|
|
namespace Koneko\SatCatalogs\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Pais extends Model
|
|
{
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'sat_pais';
|
|
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var string[]
|
|
*/
|
|
protected $fillable = [
|
|
'c_pais',
|
|
'descripcion',
|
|
'formato_de_codigo_postal',
|
|
'formato_de_registro_de_identidad_tributaria',
|
|
'validacion_del_registro_de_identidad_tributaria',
|
|
'agrupaciones',
|
|
];
|
|
|
|
public static function selectList()
|
|
{
|
|
return self::select('c_pais', 'descripcion')
|
|
->get()
|
|
->mapWithKeys(function ($item) {
|
|
return [$item->c_pais => $item->c_pais . ' - ' . $item->descripcion];
|
|
});
|
|
}
|
|
}
|