Files
safekat/ci4/app/Services/PapelService.php

27 lines
681 B
PHP

<?php
namespace App\Services;
use CodeIgniter\Config\BaseService;
use App\Models\Configuracion\TipoPapelGenericoModel;
class PapelService extends BaseService
{
protected TipoPapelGenericoModel $tipoPapelGenericoModel;
public function __construct()
{
$this->tipoPapelGenericoModel = model(TipoPapelGenericoModel::class);
}
public function getTipoPapelGenerico()
{
$values = $this->tipoPapelGenericoModel->findAll();
$tipoPapelGenericoList = [];
foreach ($values as $value) {
$tipoPapelGenericoList[$value->id] = lang('PapelGenerico.' . $value->clave);
}
return $tipoPapelGenericoList;
}
}