我想从此文档中在laravel刀片中显示项目颜色。我正在使用jenssegers / laravel-mongodb软件包 我可以使用foreach循环显示标题,但不能从嵌入式数组文档中显示标题。
"_id" : ObjectId("5534b70a76707303ac850000"),
"cck_params" : {
"title" : "Шкаф-купе",
"marking" : "",
"text" : "",
"photos" : [
"5534b6eb76707303ac830000"
],
"price" : 215000,
"colors" : [
"white",
"brown"
],
"material" : "",
"height" : 0,
"width" : 0,
"depth" : 0,
"homeland" : ""
},
"_status" : "live",
"hits" : 242,
"priority" : 6171.75,
"how_much_to_sink" : 0,
"hits_in_list" : 10472,
"displayed" : true,
"category_id" : "cupboard",
"seller_id" : ObjectId("5534b65776707303ac7d0
"uid" : 36,
"slugs" : [
"36-shkaf-kupe",
"5534b70a76707303ac850000"
],
"u_at" : ISODate("2016-12-20T04:33:02.491Z"),
"c_at" : ISODate("2015-04-20T08:21:30.114Z"),
"version" : 29,
"text_index" : {
"title" : "шкаф-купе",
"category_name" : "шкаф",
"cck_params_as_text" : "шкаф-купе, 21
}