Laravel 11, Vuexy Admin 10.3, by admin@koneko.mx
This commit is contained in:
47
modules/Admin/App/Models/Sat/UsoCfdi.php
Normal file
47
modules/Admin/App/Models/Sat/UsoCfdi.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UsoCfdi extends Model
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'sat_uso_cfdi';
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $fillable = [
|
||||
'c_uso_cfdi',
|
||||
'descripcion',
|
||||
'aplica_para_tipo_persona_fisica',
|
||||
'aplica_para_tipo_persona_moral',
|
||||
'fecha_inicio_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
'regimen_fiscal_receptor',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
|
||||
public static function selectList()
|
||||
{
|
||||
return self::selectRaw('c_uso_cfdi, CONCAT(c_uso_cfdi, " - ", descripcion) as value')
|
||||
->pluck('value', 'c_uso_cfdi');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user