<?php
/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

return [
    'default' => env('DB_DEFAULT_DRIVER', 'mysql'),
    'connections' => [
        'mysql' => [
            'driver'      => 'mysql',
            'host'        => env('MYSQL_HOST', '127.0.0.1'),
            'port'        => env('MYSQL_PORT', 3306),
            'database'    => env('MYSQL_DATABASE', 'webman'),
            'username'    => env('MYSQL_USERNAME', 'webman'),
            'password'    => env('MYSQL_PASSWORD', ''),
            'unix_socket' => '',
            'charset'     => 'utf8',
            'collation'   => 'utf8_unicode_ci',
            'prefix'      => '',
            'strict'      => true,
            'engine'      => null,
        ],
        'sqlite' => [
            'driver'   => 'sqlite',
            'database' => eval("return " . env('SQLITE_DATABASE', '') . ";"),
            'prefix'   => env('SQLITE_PREFIX', ''),
        ],
        'pgsql' => [
            'driver'   => 'pgsql',
            'host'     => env('PG_HOST', '127.0.0.1'),
            'port'     => env('PG_PORT', 5432),
            'database' => env('PG_DATABASE', 'webman'),
            'username' => env('PG_USERNAME', 'webman'),
            'password' => env('PG_PASSWORD', ''),
            'charset'  => 'utf8',
            'prefix'   => '',
            'schema'   => env('PG_SCHEMA', 'public'),
            'sslmode'  => 'prefer',
        ],
        'mongolog' => [
            'driver'   => 'mongodb',
            'host'     => env('MONGOLOG_HOST', '127.0.0.1'),
            'port'     => env('MONGOLOG_PORT', 27017),
            'database' => env('MONGOLOG_DATABASE', 'log'),
            'username' => env('MONGOLOG_USERNAME', null),
            'password' => env('MONGOLOG_PASSWORD', null),
            'options' => [
                // here you can pass more settings to the Mongo Driver Manager
                // see https://www.php.net/manual/en/mongodb-driver-manager.construct.php under "Uri Options" for a list of complete parameters that you can use
                'appname' => 'homestead'
            ],
        ],
    ]
];