请帮帮我。如何从表单中保存数据?如果它的标准来自,一切正常,但我的表格代码是:
$result = Auth::user()->results()->create($request->all() ?: []);
return $result->toArray();
我在控制器中的代码是
`if (!('webkitSpeechRecognition' in window)) {
upgrade();
} else {
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function() { ... }
recognition.onresult = function(event) { ... }
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
...`
结果: {“user_id”:4,“id”:20} - 仅保存到数据库
我可能有30个复选框,但没有保存到数据库,也没有发送到发布请求。任何的想法?