【发布时间】:2019-10-04 20:56:51
【问题描述】:
我正在尝试使用 Eloquent 在 JSON 字段中搜索,但现在可以使用,搜索结果为 0。
这适用于运行 PostgresSQL、Laravel 5.8 和 Apache 2 的 Ubuntu 服务器。
[{
"value": "1",
"label": "numero"
},{
"value": "2016",
"label": "anio"
},{
"value": "Acer",
"label": "especie"
},{
"value": "2",
"label": "cant_plantar"
}]
PlanificacionInfo::select('datos_complementarios')->WhereJsonContains('datos_complementarios', ["value" => "Escamonda 2019"]);
查询返回空
【问题讨论】:
标签: json laravel postgresql eloquent