Skip to content

Commit 7131946

Browse files
committed
docs: improve sample code
If a dev copy and paste the constructor, it won't work becaseu `parent::__construct();` is missing.
1 parent 73d3997 commit 7131946

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • user_guide_src/source/database/configuration

user_guide_src/source/database/configuration/008.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44

55
use CodeIgniter\Database\Config;
66

7+
/**
8+
* Database Configuration
9+
*/
710
class Database extends Config
811
{
12+
// ...
913
public $development = [/* ... */];
1014
public $test = [/* ... */];
1115
public $production = [/* ... */];
1216

1317
public function __construct()
1418
{
19+
// ...
20+
1521
$this->defaultGroup = ENVIRONMENT;
1622
}
1723
}

0 commit comments

Comments
 (0)