diff --git a/src/Http/Requests/CreateFormSubmissionRequest.php b/src/Http/Requests/CreateFormSubmissionRequest.php index 3cde474..b0fb475 100644 --- a/src/Http/Requests/CreateFormSubmissionRequest.php +++ b/src/Http/Requests/CreateFormSubmissionRequest.php @@ -2,7 +2,7 @@ namespace Musonza\Form\Http\Requests; -use Form; +use Musonza\Form\Form; use Illuminate\Foundation\Http\FormRequest; use Musonza\Form\Rules\ReCaptcha; @@ -25,9 +25,12 @@ public function authorize() */ public function rules() { + /** @var $form Form */ + $form = app(Form::class); + return [ 'g-recaptcha-response' => [ - Form::googleRecaptchaEnabled() ? 'required' : '', + $form->googleRecaptchaEnabled() ? 'required' : '', new ReCaptcha, ], ];