v2board/app/Http/Requests/Admin/ConfigSave.php

56 lines
1.5 KiB
PHP
Raw Normal View History

2019-10-29 15:33:36 +08:00
<?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
class ConfigSave extends FormRequest
{
public static function filter() {
2020-01-04 17:25:44 +08:00
return array_keys($this->rules());
2019-10-29 15:33:36 +08:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'invite_force' => 'in:0,1',
'invite_commission' => 'integer',
2019-11-18 18:41:33 +08:00
'invite_gen_limit' => 'integer',
2019-11-18 18:46:28 +08:00
'invite_never_expire' => 'in:0,1',
2019-10-29 15:33:36 +08:00
'stop_register' => 'in:0,1',
'email_verify' => 'in:0,1',
'app_url' => 'url',
2019-11-23 23:29:22 +08:00
'subscribe_url' => 'url',
2019-11-30 14:56:55 +08:00
'plan_update_fee' => 'numeric',
'plan_is_update' => 'in:0,1',
2020-01-04 17:21:46 +08:00
'try_out_register' => 'in:0,1',
'try_out_plan_id' => 'integer',
'try_out_day' => 'integer',
2019-11-23 23:29:22 +08:00
// server
'server_token' => 'min:16',
2019-10-29 15:33:36 +08:00
// alipay
'alipay_enable' => 'in:0,1',
'alipay_appid' => 'integer|min:16',
'alipay_pubkey' => 'max:2048',
'alipay_privkey' => 'max:2048',
// stripe
'stripe_alipay_enable' => 'in:0,1',
2019-11-23 01:41:47 +08:00
'stripe_wepay_enable' => 'in:0,1',
2019-12-27 01:50:26 +08:00
// bitpayx
'bitpayx_enable' => 'in:0,1',
2019-11-23 01:41:47 +08:00
// tutorial
'apple_id' => 'email'
2019-10-29 15:33:36 +08:00
];
}
public function messages()
{
return [
];
}
}