topthink / think-mongo
mongodb driver for thinkphp6.0
Installs: 122 269
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-11-29 09:20:14 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();