<?php
//if (!defined('BASEPATH')) exit('No direct script access allowed');

namespace App\Libraries;

class EpsConfig_Lib
{
    public function __construct()
    {

    }
    // This function fetch data from db table
    public function getData()
    {
        $array = ['id' => '1'];
        $db      = \Config\Database::connect();
        $tblempresa = $db->table('empresas');
        $empresa= $tblempresa->where($array)->get()->getFirstRow('array');
        $tblconfig = $db->table('configs');
        $config = $tblconfig->where($array)->get()->getFirstRow('array');
        $iva = $tblconfig->select('id, iva')->get()->getResult();
        //$tblmodulos = $db->table('modulos');
        //$modulos = $tblmodulos->get()->getResult();

        $response = array_merge($empresa, $config, $iva);

        return $response;
        //$response = "Robot";
        return $response;
    }
}
