MongoDB配置在CakePHP 3.x中 [英] MongoDB configuration in CakePHP 3.x
问题描述
我在互联网上找到的所有数据都是关于CakePHP V2的。在V3我不能配置MongoDB CakePHP 3.我不知道如何配置mongoDB的数据源。
我的默认数据库配置如下:
All data I found on the Internet is about CakePHP V2. In V3 I can't configure MongoDB with cakePHP 3. I dont know how to configure datasource for mongoDB. My Default Databse Configuration is as follows:
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'users',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
'quoteIdentifiers' => false,
]
]
推荐答案
这不是一个解决方案,但会给你一个见解cakePHP 3与mongoDB。
不支持对于cakePHP 3的mongodb数据源为now.The你可以做的最多的是创建一个像 ichikaway
做的cakePHP 2。你可以如果您希望在此链接,请使用。手指交叉,有人会采取主动,建立一个。您可以在cakefest通过 ichikaway
的演示文稿,并获得有关mongodb的cakePHP 2插件的洞察视频链接
This is not a solution but will give you an insight of cakePHP 3 with mongoDB.
There is no support for mongodb datasource for cakePHP 3 as for now.The most you can do is create a new one Like ichikaway
did for cakePHP 2. You can use that if you want Link Here. Fingers are crossed that someone will take an initiative and built one. You can go through the presentation of ichikaway
at cakefest and get an insight for the cakePHP 2 plugin for mongodb Video Link
编辑: lewestopher开发的新插件
请随时查看网址,了解详情 cakephp-monga 。我还没有使用它,但它值得一试,尼斯启动。
New plugin developed by lewestopher
please feel free to checkout the url for further information cakephp-monga. I haven't used it yet but it's worth a try, Nice initiation.
这篇关于MongoDB配置在CakePHP 3.x中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!