【发布时间】:2017-08-05 22:41:31
【问题描述】:
我在 mongodb compass 上的数据是这样的:
我从这里读到:https://laravel.com/docs/5.3/queries#json-where-clauses
我尝试实现这样的 json where 子句:
Message::where('information->seller_id', 1)
->get();
结果未显示。而数据存在
这个查询似乎仍然错误
我尝试在这里阅读参考:https://github.com/jenssegers/laravel-mongodb
但是我没找到
我该如何解决这个问题?
【问题讨论】:
-
为什么要投反对票?有什么问题吗?
-
我认为列数据类型应该是json。在您的情况下,
information列应该是 json 的数据类型。
标签: php json mongodb laravel laravel-5.3