config
This commit is contained in:
20
app_old/ui/settings/04_databases.php
Normal file
20
app_old/ui/settings/04_databases.php
Normal 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;
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user