$data = Db::name('call')->find();
dump($data);
这样查询,报错
Declaration of think\mongo\Query::inc($field, $step = 1) should be compatible with think\db\Query::inc($field, $step = 1, $op = 'INC')配置如下'type' => '\think\mongo\Connection',
// 设置查询类
'query' => '\think\mongo\Query',
// 服务器地址
'hostname' => env('mongodb.hostname'),
// 数据库名
'database' => env('mongodb.database'),
// 数据库用户名
'username' => env('mongodb.username'),
// 数据库密码
'password' => env('mongodb.password'),
// 端口
'hostport' => env('mongodb.hostport'),
//转换_id成id
'pk_convert_id' => true, 最佳答案