mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
27 lines
603 B
PHP
27 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Auth;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class RegisterRegisterRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
|
|
return [
|
|
'g-recaptcha-response' => [
|
|
'required',
|
|
'captcha',
|
|
],
|
|
];
|
|
} else {
|
|
return [];
|
|
}
|
|
|
|
}
|
|
}
|