This extension provides the MongoDB integration for the Yii2 framework and allows you to work with MongoDB collection's records via the
- Create a new application by using composer, as described in the official guide at http://www.yiiframework.com/doc-2.0/guide-start-installation.html.
- Install MongoDB using the correct installation process from https://docs.mongodb.org/manual/installation/ for your system.
- Install the
- Install the component with the following command:
composer require yiisoft/yii2-mongodb
How to do it…
- First of all, create the new MongoDB database. Run it in the
mongo-clientshell and type the database name:
mongo > use mydatabase
- Add this connection information ...