topthink / think-mongo
mongodb driver for thinkphp6.0
Installs: 121 286
Dependents: 9
Suggesters: 0
Security: 0
Stars: 105
Watchers: 11
Forks: 52
Open Issues: 25
Requires
- topthink/framework: ^6.0.0
This package is auto-updated.
Last update: 2024-10-29 09:13:03 UTC
README
请使用最新版本的topthink/think-orm 本仓库不再维护更新
首先安装官方的mongodb扩展:
http://pecl.php.net/package/mongodb
然后,配置应用的数据库配置文件database.php
的type
参数改为:
'type' => 'Mongo',
即可正常使用MongoDb,例如:
Db::name('demo')
->find();
Db::name('demo')
->field('id,name')
->limit(10)
->order('id','desc')
->select();