定制 adrian0350/cakephp-replication 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

adrian0350/cakephp-replication

最新稳定版本:1.0.1

Composer 安装命令:

composer require adrian0350/cakephp-replication

包简介

CakePHP 2.10.24 - MySQL Replication for MySQL 5.7

README 文档

README

CakeReplication helps you setup CakePHP 2.10 (latest and last) Replication for MySQL 5.7 in a more integrated way
adding a layer between Model and the MySQL default driver.
It's been only tested using CakePHP version ^2.10.0

Requirements

  • PHP ^7.4
  • CakePHP ^2.10.0
  • MySQL 5.7
  • Updating your app/Config/database.php

There are other versions of this implementation but are quite outdated, made for older CakePHP versions that
have missmatching class methods and arguments.

Installation

Install the Plugin with Composer from your CakePHP's ROOT directory.

 $ composer require adrian0350/cakephp-replication 


Load CakeReplication Plugin in your bootstrap.php.

 CakePlugin::load('CakeReplication');


Add Datasourace in your database.php database configuration.

class DATABASE_CONFIG {
    public $default = array(
        'datasource'  => 'CakeReplication.Database/MysqlReplication',
        'persistent'  => false,
        'host'        => 'localhost',
        'login'       => 'cakephpuser',
        'password'    => 'c4k3roxx!',
        'database'    => 'my_cakephp_project',
        'prefix'      => ''
    );
}

For a complete example of how to setup replication in your app see example database.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-20