Download the PHP package connehito/cakephp2-master-replica without Composer
On this page you can find all versions of the php package connehito/cakephp2-master-replica. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download connehito/cakephp2-master-replica
More information about connehito/cakephp2-master-replica
Files in connehito/cakephp2-master-replica
Download connehito/cakephp2-master-replica
More information about connehito/cakephp2-master-replica
Files in connehito/cakephp2-master-replica
Vendor connehito
Package cakephp2-master-replica
Short Description Provides the features for multiple database connections as master/replica and switching in Datasource.
License MIT
Package cakephp2-master-replica
Short Description Provides the features for multiple database connections as master/replica and switching in Datasource.
License MIT
Please rate this library. Is it a good library?
Informations about the package cakephp2-master-replica
CakePHP Master Replica Plugin
The datasource for CakePHP(2.x).This plugin enables one-connection to act as two(or more) roles, like master(read-write) and replica(read-only).
Supports
- PHP 5.6+ / 7.0+
- CakePHP 2.7+
- MySQL
Usage
- Download the repository to set
app/Plugin/MasterReplica
- Load plugin in
app/Config/bootstrap.php
likeCakePlugin::load('MasterReplica');
orCakePlugin::loadAll();
- Set your
database.php
withMasterReplica.Database/MasterReplicaMysql
datasource. It requiresconnections
property.
Example
Set up your database configuration.
- Databse-A(for master): mysql;host=db-host,databasename=app_db,login=root,pass=password
- Databse-B(for replica): mysql;host=replica-host,databasename=app_db,login=read-only-user,pass=another-password
In app, now you can connect to database master or replica db as you like :tada:
License
The plugin is available as open source under the terms of the MIT License.
All versions of cakephp2-master-replica with dependencies
PHP Build Version
Package Version
No informations.
The package connehito/cakephp2-master-replica contains the following files
Loading the files please wait ....