Agregar métodos para obtener la configuración de la base de datos y el nivel de registro
This commit is contained in:
parent
49999c964f
commit
50bde319a7
@ -11,4 +11,21 @@ class Config
|
||||
$dotenv = Dotenv::createImmutable(__DIR__ . '/../../../');
|
||||
$dotenv->load();
|
||||
}
|
||||
|
||||
public static function getDatabaseConfig(): array
|
||||
{
|
||||
return [
|
||||
'database_type' => getenv('DB_TYPE'),
|
||||
'database_name' => getenv('DB_NAME'),
|
||||
'server' => getenv('DB_HOST'),
|
||||
'username' => getenv('DB_USER'),
|
||||
'password' => getenv('DB_PASS'),
|
||||
'port' => getenv('DB_PORT')
|
||||
];
|
||||
}
|
||||
|
||||
public static function getLogLevel(): string
|
||||
{
|
||||
return getenv('LOG_LEVEL') ?: 'info';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user