cyzonetech / think-mongo
mongodb driver for thinkphp6.0
Installs: 164
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 52
pkg:composer/cyzonetech/think-mongo
Requires
- topthink/framework: ^6.0.0
This package is not auto-updated.
Last update: 2025-09-22 12:37:34 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();