Skip to content

Commit a33e25e

Browse files
committed
Database configuration example.
1 parent 74fbf39 commit a33e25e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

configs/database.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
return [
4+
/*
5+
* Connection settings that will be used when no one is specified:
6+
*/
7+
'default' => 'mysql',
8+
9+
/*
10+
* A simple MySQL connection using PDO.
11+
*/
12+
'mysql' => [
13+
'driver' => \Corviz\Connector\PDO\Connection::class,
14+
15+
//Options may vary according to the current driver.
16+
//See third party documentation for references.
17+
'options' => [
18+
'dsn' => 'mysql:host=127.0.0.1;dbname=test;charset=utf8',
19+
'user' => 'root',
20+
'password' => '',
21+
//'afterConnect' => function(\PDO $pdo) {
22+
// //this will be executed after connect
23+
//},
24+
],
25+
],
26+
];

0 commit comments

Comments
 (0)