默认值
This commit is contained in:
parent
4e98504a13
commit
29b8e43a9d
@ -28,7 +28,7 @@ public function store(Request $request) {
|
||||
$request = $request->all();
|
||||
|
||||
// module_id 和 host_id 必须有个要填写
|
||||
if (!$request['module_id'] && !$request['host_id']) {
|
||||
if (!$request['module_id'] ?? 0 && !$request['host_id'] ?? 0) {
|
||||
return $this->error('module_id 和 host_id 至少要填写一个');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user