diff --git a/app/Http/Controllers/Admin/ConfigController.php b/app/Http/Controllers/Admin/ConfigController.php index b06093b8..c36b2aaf 100755 --- a/app/Http/Controllers/Admin/ConfigController.php +++ b/app/Http/Controllers/Admin/ConfigController.php @@ -66,7 +66,8 @@ class ConfigController extends Controller 'email_gmail_limit_enable' => config('v2board.email_gmail_limit_enable', 0), 'recaptcha_enable' => (int)config('v2board.recaptcha_enable', 0), 'recaptcha_key' => config('v2board.recaptcha_key'), - 'recaptcha_site_key' => config('v2board.recaptcha_site_key') + 'recaptcha_site_key' => config('v2board.recaptcha_site_key'), + 'tos_url' => config('v2board.tos_url') ], 'subscribe' => [ 'plan_change_enable' => (int)config('v2board.plan_change_enable', 1), diff --git a/app/Http/Requests/Admin/ConfigSave.php b/app/Http/Requests/Admin/ConfigSave.php index fcc4e05b..403a8671 100755 --- a/app/Http/Requests/Admin/ConfigSave.php +++ b/app/Http/Requests/Admin/ConfigSave.php @@ -41,6 +41,7 @@ class ConfigSave extends FormRequest 'recaptcha_enable' => 'in:0,1', 'recaptcha_key' => '', 'recaptcha_site_key' => '', + 'tos_url' => 'nullable|url', // subscribe 'plan_change_enable' => 'in:0,1', 'reset_traffic_method' => 'in:0,1', @@ -121,7 +122,8 @@ class ConfigSave extends FormRequest return [ 'app_url.url' => '站点URL格式不正确,必须携带http(s)://', 'subscribe_url.url' => '订阅URL格式不正确,必须携带http(s)://', - 'server_token.min' => '通讯密钥长度必须大于16位' + 'server_token.min' => '通讯密钥长度必须大于16位', + 'tos_url.url' => '服务条款URL格式不正确' ]; } }