PHPackages                             drmvc/database - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. drmvc/database

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

drmvc/database
==============

Advanced plugin for work with database for DrMVC Framework

3.0.1(7y ago)06083MITPHPPHP ^7.0

Since Mar 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/drmvc/database)[ Packagist](https://packagist.org/packages/drmvc/database)[ Docs](https://drmvc.com/)[ RSS](/packages/drmvc-database/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (14)Used By (3)

[![Latest Stable Version](https://camo.githubusercontent.com/3dfdc1d5f8f2b6cb34167d5f3630fcba3fc708ed58aec7f31af895e5389acfb2/68747470733a2f2f706f7365722e707567782e6f72672f64726d76632f64617461626173652f762f737461626c65)](https://packagist.org/packages/drmvc/database)[![Build Status](https://camo.githubusercontent.com/ca93b78c5a2cb752871401a2e8158b08f20ccceed1a90d4f6679113883b2c96a/68747470733a2f2f7472617669732d63692e6f72672f64726d76632f64617461626173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/drmvc/database)[![Total Downloads](https://camo.githubusercontent.com/d3303c7c0856d90355004aabd36dbf06fbc55e3135ce10f3c99ed8f36295b359/68747470733a2f2f706f7365722e707567782e6f72672f64726d76632f64617461626173652f646f776e6c6f616473)](https://packagist.org/packages/drmvc/database)[![License](https://camo.githubusercontent.com/3a08bf3700b466a2bdcf4058479dbc14fda6b22534e76da5d7869450404f1239/68747470733a2f2f706f7365722e707567782e6f72672f64726d76632f64617461626173652f6c6963656e7365)](https://packagist.org/packages/drmvc/database)[![PHP 7 ready](https://camo.githubusercontent.com/e2551862ea76be1857789d6cd3803aae83f198da481661bd891fe44959b13c8f/68747470733a2f2f7068703772656164792e74696d6573706c696e7465722e63682f64726d76632f64617461626173652f6d61737465722f62616467652e737667)](https://travis-ci.org/drmvc/database)[![Code Climate](https://camo.githubusercontent.com/b0f8aeb9cd7a75494070a2d86f785d363f4890fe5849e49da52bdd6861748e79/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64726d76632f64617461626173652f6261646765732f6770612e737667)](https://codeclimate.com/github/drmvc/database)[![Scrutinizer CQ](https://camo.githubusercontent.com/5cf496346ba220fc4049cfe8ccdbe3d22afe94946181db9a49ff04e1c97b260c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64726d76632f64617461626173652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/drmvc/database/)

DrMVC\\Database
===============

[](#drmvcdatabase)

Advanced module for work with databases and models.

```
composer require drmvc/database

```

It is a specific module, allows you to use multiple databases at the same time, you can switch database from model class, you can call same model methods with different databases, you can work with MongoDB and Mysql from one controller, everything what you want.

Supported databases
-------------------

[](#supported-databases)

For now only databases from list below is supported, but support of some new databases will be added soon.

DriverDatabasemysqlMySQL and MariaDBpgsqlPostgreSQLsqliteSQLite (file and memory modes)mongodbMongoDB (php 7.0 and above only)Database configuration
----------------------

[](#database-configuration)

You can find few examples of database config files with description and links [here](extra/configs/).

Example of MySQL `database.php` config file:

```
