cirelramos/aws-database-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cirelramos/aws-database-client

Composer 安装命令:

composer require cirelramos/aws-database-client

包简介

package to search database client aws

README 文档

README

Software License

About

The aws database client package to search database client aws .

Tutorial how create composer package

Installation

Require the cirelramos/aws-database-client package in your composer.json and update your dependencies:

composer require cirelramos/aws-database-client

Configuration

set provider

'providers' => [
    // ...
    Cirelramos\Database\Providers\ServiceProvider::class,
],

The defaults are set in config/aws-database-client.php. Publish the config to copy the file to your own config:

php artisan vendor:publish --provider="Cirelramos\Database\Providers\ServiceProvider"

Note: this is necessary to yo can change default config

Usage

add provider in config/app.php

    'providers' => [
        CirelRamos\Database\Providers\DatabaseServiceProvider::class,
   ]

change in config/database.php

    $mysqlConnection = env('TYPE_MYSQL_CONNECTION', null);

    $mysql = [
        'driver' => 'vault',
    ];

    if ($mysqlConnection === 'local' || $mysqlConnection === null) {
        $mysql = [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'apitrillo'),
            'username' => env('DB_USERNAME', 'root'),
            'password' => env('DB_PASSWORD', 'root'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => env('DB_CHARSET_MYSQL', 'utf8mb4'),
            'collation' => env('DB_COLLECTION_MYSQL' , 'utf8mb4_unicode_ci'),
            'prefix' => '',
            'modes' => [
                'NO_UNSIGNED_SUBTRACTION',
                'NO_ENGINE_SUBSTITUTION',
            ],
            'engine' => null,
        ];
    }

$database = [

    //    .
    //    .

    'connections' => [

        //        .
        //        .

        'mysql' => $mysql,
        
        //        .
        //        .
     ]
]

return $database;

License

Released under the MIT License, see LICENSE.

统计信息

  • 总下载量: 50
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固