jyil/webman-base-utils

Webman plugin jyil/webman-base-utils

v1.0.2 2022-07-25 03:05 UTC

This package is auto-updated.

Last update: 2024-10-25 07:57:57 UTC


README

禁用默认路由

config/route.php

Route::disableDefaultRoute();

数据库配置

config/database.php

return [
    // 默认数据库
    'default' => 'mysql',

    // 各种数据库配置
    'connections' => [
        'mysql' => [
            'driver'      => 'mysql',
            'host'        => env('DB_HOST'),
            'port'        => env('DB_PORT'),
            'database'    => env('DB_NAME'),
            'username'    => env('DB_USER'),
            'password'    => env('DB_PASSWORD'),
            'unix_socket' => '',
            'charset'     => 'utf8',
            'collation'   => 'utf8_unicode_ci',
            'prefix'      => '',
            'strict'      => true,
            'engine'      => null,
        ],
    ],
];

env

新建.env文件

# database
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=webman
DB_USERNAME=root
DB_PASSWORD=root