This commit is contained in:
root 2020-01-04 17:27:21 +08:00
parent 0749372f34
commit 45b03b4fba

View File

@ -6,17 +6,7 @@ use Illuminate\Foundation\Http\FormRequest;
class ConfigSave extends FormRequest class ConfigSave extends FormRequest
{ {
public static function filter() { CONST RULES = [
return array_keys($this->rules());
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'invite_force' => 'in:0,1', 'invite_force' => 'in:0,1',
'invite_commission' => 'integer', 'invite_commission' => 'integer',
'invite_gen_limit' => 'integer', 'invite_gen_limit' => 'integer',
@ -45,6 +35,18 @@ class ConfigSave extends FormRequest
// tutorial // tutorial
'apple_id' => 'email' 'apple_id' => 'email'
]; ];
public static function filter() {
return array_keys(self::RULES);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return self::RULES;
} }
public function messages() public function messages()