【发布时间】:2019-12-25 13:31:15
【问题描述】:
我有颜色和图像的关系,
每种产品都有颜色,每种颜色都有图像和图标
这是来自数据库的响应:
[
{
"id": 1,
"name": "1",
"colors": [
{
"id": 1,
"stocks_id": 1,
"color_name": "Red",
"icon": "111.png",
"images": [
{
"url": "111-111.png"
}
]
},
{
"id": 2,
"stocks_id": 2,
"color_name": "green",
"icon": "222.png",
"images": [
{
"url": "111-111.png"
}
]
}
],
}
]
如何创建 HTML 表单来添加此信息?
以及如何使用控制器发布这些按颜色分组的图像?
【问题讨论】:
-
在你的表单域中这样使用
$array_name['colors']['color_name'] -
@A.ANoman 你能用一个完整的例子来回答吗?
-
请至少分享您想要的 html 表单...
标签: php html laravel laravel-5 upload