Skip to content

Commit 600093b

Browse files
committed
Don't assume facade alias
1 parent 118ddc3 commit 600093b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Http/Requests/CreateFormSubmissionRequest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Musonza\Form\Http\Requests;
44

5-
use Form;
5+
use Musonza\Form\Form;
66
use Illuminate\Foundation\Http\FormRequest;
77
use Musonza\Form\Rules\ReCaptcha;
88

@@ -25,9 +25,12 @@ public function authorize()
2525
*/
2626
public function rules()
2727
{
28+
/** @var $form Form */
29+
$form = app(Form::class);
30+
2831
return [
2932
'g-recaptcha-response' => [
30-
Form::googleRecaptchaEnabled() ? 'required' : '',
33+
$form->googleRecaptchaEnabled() ? 'required' : '',
3134
new ReCaptcha,
3235
],
3336
];

0 commit comments

Comments
 (0)