yilianhudong / diy-yii-mongodb
青岛易联互动网络科技有限公司, 定制使用yii框架
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/yilianhudong/diy-yii-mongodb
Requires
- php: ^7.1
- yilianhudong/diy-yii: ~1.0.0
This package is auto-updated.
Last update: 2025-10-13 15:04:50 UTC
README
This is the core framework code of Yii 2.
This repository is a read-only git subsplit of https://github.com/yiisoft/yii2. Please submit issue reports and pull requests to the main repository. For license information check the LICENSE-file.
Installation
The preferred way to install the Yii framework is through composer.
Either run
composer require yilianhudong/diy-yii-mongodb
or add
"yilianhudong/diy-yii-mongodb": "~1.0.0",
to the require section of your composer.json.
Configuration
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'mongodb' => [ 'class' => '\yii\mongodb\Connection', 'dsn' => 'mongodb://@localhost:27017/mydatabase', 'options' => [ "username" => "Username", "password" => "Password" ] ], ], ];