可能修复

This commit is contained in:
iVampireSP.com 2022-09-13 12:22:09 +08:00
parent 7bb8c83946
commit 10b9d7ea61
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -26,13 +26,13 @@ public function store(Request $request) {
]); ]);
// module_id 和 host_id 必须有个要填写 // module_id 和 host_id 必须有个要填写
if ($request['module_id'] == null && $request['host_id'] = null) { if (!$request->module_id && !$request->host_id) {
return $this->error('module_id 和 host_id 至少要填写一个'); return $this->error('module_id 和 host_id 至少要填写一个');
} }
$workOrder = WorkOrder::create([ $workOrder = WorkOrder::create([
'title' => $request->title, 'title' => $request->title,
'content' => $request['content'], 'content' => $request->content,
'module_id' => $request->module_id, 'module_id' => $request->module_id,
'host_id' => $request->host_id, 'host_id' => $request->host_id,
'status' => 'pending', 'status' => 'pending',