我正在尝试使用 Eloquent 在 JSON 字段中进行搜索,但现在可以工作,搜索结果为 0。
这是针对 Ubuntu 服务器,运行 PostgresSQL、Laravel 5.8 和 Apache 2。
[{
"value": "1",
"label": "numero"
},{
"value": "2016",
"label": "anio"
},{
"value": "Acer",
"label": "especie"
},{
"value": "2",
"label": "cant_plantar"
}]
Run Code Online (Sandbox Code Playgroud)
PlanificacionInfo::select('datos_complementarios')->WhereJsonContains('datos_complementarios', ["value" => "Escamonda 2019"]);
Run Code Online (Sandbox Code Playgroud)
查询返回空