Added system polling

This commit is contained in:
2023-07-26 19:44:07 +10:00
parent c23b5ebfc2
commit 4e44e2e266
19 changed files with 733 additions and 88 deletions

View File

@@ -27,6 +27,14 @@ class SystemRegister extends FormRequest
return Gate::allows($this->so->users->count() ? 'update' : 'register',$this->so);
}
public function messages(): array
{
return [
'hold' => 'Must be Yes or No',
'pollmode' => 'Must be Hold, Normal or Crash',
];
}
/**
* Get the validation rules that apply to the request.
*
@@ -64,6 +72,7 @@ class SystemRegister extends FormRequest
$this->so->exists ? [
'active' => 'required|boolean',
'hold' => 'required|boolean',
'pollmode' => 'required|integer|min:0|max:2',
] : [],
));
}