dev-master
9999999-devMongoDb extension for the Yii framework
BSD-3-Clause
The Requires
- yiisoft/yii2 >=2.0.5
- ext-mongo >=1.5.0
by Andrey Yaresko
mongodb yii2 mongo active-record
Wallogit.com
2017 © Pedro Peláez
MongoDb extension for the Yii framework
This extension provides the MongoDB integration for the Yii framework 2.0., (*1)
For license information check the LICENSE-file., (*2)
Documentation is at docs/guide/README.md., (*3)
This extension requires MongoDB PHP Extension version 1.5.0 or higher., (*5)
The preferred way to install this extension is through composer., (*6)
Either run, (*7)
php composer.phar require --prefer-dist yiisoft/yii2-mongodb
or add, (*8)
"yiisoft/yii2-mongodb": "~2.0.0"
to the require section of your composer.json., (*9)
To use this extension, simply add the following code in your application configuration:, (*10)
return [
//....
'components' => [
'mongodb' => [
'class' => '\aayaresko\mongodb\Connection',
'dsn' => 'mongodb://developer:password@localhost:27017/mydatabase',
],
],
];
Add into your configuration file, (*11)
'modules' => [
//....
'gii-mongodb' => [
'class' => 'aayaresko\gii\Module',
'generators' => [
'mongoDbModel' => [
'class' => 'aayaresko\mongodb\gii\model\Generator'
]
],
],
],
'components' => [
//....
'mongodb' => [
'class' => '\aayaresko\mongodb\Connection',
'dsn' => 'mongodb://dbuser:dbpass@localhost:27017/dbname',
],
],
MongoDb extension for the Yii framework
BSD-3-Clause
mongodb yii2 mongo active-record