We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7da8e24 + a7449ff commit 8c83cceCopy full SHA for 8c83cce
src/DB/Codeigniter4Adapter.php
@@ -17,19 +17,22 @@ class Codeigniter4Adapter extends DBAdapter
17
protected $db;
18
19
/**
20
- * @var $config
+ * @var array
21
*/
22
+ protected $config;
23
+
24
public function __construct($config = null)
25
{
-
26
+ $this->config = $config ?? ['DBGroup' => 'default'];
27
+ $this->config['DBGroup'] = $this->config['DBGroup'] ?? 'default';
28
}
29
30
31
* @return $this
32
33
public function connect()
34
- $this->db = \Config\Database::connect();
35
+ $this->db = \Config\Database::connect($this->config['DBGroup']);
36
37
return $this;
38
0 commit comments