Skip to content

Commit 56f2249

Browse files
committed
change connection example in readme
1 parent 66c2e8d commit 56f2249

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,18 @@ declare(strict_types=1);
4242

4343
require_once "vendor/autoload.php";
4444

45-
use Cycle\Database\Config\DatabaseConfig;
46-
use Cycle\Database\Config\SQLiteDriverConfig;
45+
use Cycle\Database\Config;
4746
use Cycle\Database\DatabaseManager;
4847

49-
$dbm = new DatabaseManager(new DatabaseConfig([
48+
$dbm = new DatabaseManager(new Config\DatabaseConfig([
5049
'databases' => [
5150
'default' => ['connection' => 'sqlite'],
5251
],
5352
'connections' => [
54-
'sqlite' => new SQLiteDriverConfig(
55-
queryCache: true
53+
'sqlite' => new Config\SQLiteDriverConfig(
54+
connection: new Config\SQLite\FileConnectionConfig(
55+
database: 'runtime/database.db'
56+
),
5657
),
5758
],
5859
]));

0 commit comments

Comments
 (0)