我有一个表单,在表单内我可以输入多个图像,并将其转换为 json
我的表单 html create.blade.php
脚本中的此函数以 json 格式将图像输出到 var AttachmentArray,我也想通过表单发布
function printvalues() {
console.log(AttachmentArray); all image converted in base64 output in json format with imahe details
有没有办法将 json 连接到表单,当我按提交 json 时,数据将根据请求输出
laravel 9 公告控制器.php
public function store(Request $request)
{
//dd($request);
$jsonimages = $request->jsonimages;
// decode the json a create loop to upload to database image
// some code to upload the form to announcement database
//image upload
}
我不只是在前端,大多数时候我首先在后端开发,这是我的第一个网络应用程序项目,我尝试搜索ajax或其他东西,但我还不明白。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号