["config_name", "config_key"], 'edit' => ["config_id", "config_name", "config_key"], ]; /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ 'config_id' => 'required', 'config_name' => 'required', 'config_key' => 'required', 'config_value' => 'required', 'remark' => 'required', ]; } public function messages(): array { return [ 'config_name.required' => '参数名称必传!', 'config_key.required' => '参数键名必传!', 'config_value.required' => '参数键值必传!', 'remark.required' => '备注必传!', ]; } }