2017-12-15 03:05:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Admin\Settings;
|
|
|
|
|
|
|
|
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|
|
|
|
|
|
|
class AdvancedSettingsFormRequest extends AdminFormRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Return all of the rules to apply to this request's data.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'recaptcha:enabled' => 'required|in:true,false',
|
|
|
|
'recaptcha:secret_key' => 'required|string|max:255',
|
|
|
|
'recaptcha:website_key' => 'required|string|max:255',
|
|
|
|
'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60',
|
|
|
|
'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60',
|
|
|
|
'pterodactyl:console:count' => 'required|integer|min:1',
|
|
|
|
'pterodactyl:console:frequency' => 'required|integer|min:10',
|
2020-09-28 20:14:14 +00:00
|
|
|
'allocation:enabled' => 'required|in:true,false',
|
|
|
|
'pterodactyl:allocation:start' => 'required|integer|between:2000,65535',
|
|
|
|
'pterodactyl:allocation:stop' => 'required|integer|between:2000,65535',
|
2017-12-15 03:05:26 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function attributes()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'recaptcha:enabled' => 'reCAPTCHA Enabled',
|
|
|
|
'recaptcha:secret_key' => 'reCAPTCHA Secret Key',
|
|
|
|
'recaptcha:website_key' => 'reCAPTCHA Website Key',
|
|
|
|
'pterodactyl:guzzle:timeout' => 'HTTP Request Timeout',
|
|
|
|
'pterodactyl:guzzle:connect_timeout' => 'HTTP Connection Timeout',
|
|
|
|
'pterodactyl:console:count' => 'Console Message Count',
|
|
|
|
'pterodactyl:console:frequency' => 'Console Frequency Tick',
|
2020-09-28 20:14:14 +00:00
|
|
|
'allocation:enabled' => 'Auto Create Allocations Enabled',
|
|
|
|
'pterodactyl:allocation:start' => 'Starting Port',
|
|
|
|
'pterodactyl:allocation:stop' => 'Ending Port',
|
2017-12-15 03:05:26 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|