Handle no report key parameter
This commit is contained in:
parent
bcd67cf42b
commit
fb680606e8
1 changed files with 11 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue