Handle no report key parameter

This commit is contained in:
David Bomba 2022-05-21 10:37:30 +10:00
parent bcd67cf42b
commit fb680606e8

View File

@ -36,4 +36,15 @@ class GenericReportRequest extends Request
'send_email' => 'required|bool',
];
}
public function prepareForValidation()
{
$input = $this->all();
if(!array_key_exists('report_keys', $input))
$input['report_keys'] = [];
$this->replace($input);
}
}