gam6itko/cycle-nyholm-dsn-bridge

sypex-geo bridge for spiral framework

0.2.2 2023-12-31 14:03 UTC

This package is auto-updated.

Last update: 2024-11-30 01:59:48 UTC


README

# app/config/database.php

return [
    'default' => env('DATABASE_DEFAULT_DRIVER', 'my-db'),

    'databases' => [
        'my-db' => [
            'connection' => 'mysql.db',
        ],
    ],

    'connections' => [
        'mysql.db' => new MySQLDriverConfig(
            // 'mysql:host=mysql;dbname=testdb;charset=utf8mb4', 'user', 'pass'
            new NyholmDsnConnectionConfig('mysql://user:pass@mysql:3306/testdb?charset=utf8mb4')
        ),
    ],
];