You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[
'displayErrorDetails' => true, // set to false in production
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
// Renderer settings
'renderer' => [
'template_path' => __DIR__ . '/../templates/',
],
// Monolog settings
'logger' => [
'name' => 'slim-app',
'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log',
'level' => \Monolog\Logger::DEBUG,
],
"db" => [
"host" => "localhost",
"dbname" => "***",
"user" => "***1",
"pass" => "***"
],
],
];
With this settings it works perfectly in the route when I called this e.g.
$selectQueryResult1 = $this->db->prepare($selectQuery1)
The issue now I will want to have many different database e.g. db1, db2; when I set new settings in the settings file I always get this error
/var/www/html/apiv1/vendor/slim/slim/Slim/Container.php(172): Slim\Container->get('db1')
How can I set and call those extra database settings?
The text was updated successfully, but these errors were encountered:
Current below is my settings.php
[ 'displayErrorDetails' => true, // set to false in production 'addContentLengthHeader' => false, // Allow the web server to send the content-length header // Renderer settings 'renderer' => [ 'template_path' => __DIR__ . '/../templates/', ], // Monolog settings 'logger' => [ 'name' => 'slim-app', 'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log', 'level' => \Monolog\Logger::DEBUG, ], "db" => [ "host" => "localhost", "dbname" => "***", "user" => "***1", "pass" => "***" ], ], ]; With this settings it works perfectly in the route when I called this e.g. $selectQueryResult1 = $this->db->prepare($selectQuery1) The issue now I will want to have many different database e.g. db1, db2; when I set new settings in the settings file I always get this error /var/www/html/apiv1/vendor/slim/slim/Slim/Container.php(172): Slim\Container->get('db1') How can I set and call those extra database settings?The text was updated successfully, but these errors were encountered: