Current below is my settings.php
<?php
return [
'settings' => [
'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,
],
"dbShard1" => [
"host" => "localhost",
"dbname" => "***",
"user" => "***",
"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?