This commit is contained in:
Juan Pablo Vial
2023-07-24 20:41:38 -04:00
parent 6ab24c8961
commit be33305cf1
612 changed files with 11436 additions and 107 deletions

View File

@ -0,0 +1,20 @@
<?php
use Psr\Container\ContainerInterface;
return [
'databases' => function(ContainerInterface $container) {
$env = $container->get('env');
$arr = [
ORM::DEFAULT_CONNECTION => (object) [
'host' => $env['MYSQL_HOST'],
'database' => $env['MYSQL_DATABASE'],
'username' => $env['MYSQL_USER'],
'password' => $env['MYSQL_PASSWORD']
]
];
if (isset($env['MYSQL_PORT'])) {
$arr[ORM::DEFAULT_CONNECTION]->port = $env['MYSQL_PORT'];
}
return (object) $arr;
}
];