File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ Add the reCAPTCHA script to your Blade templates using the `@recaptcha` directiv
128128- ` Badge::INLINE ` - Displays the badge inline
129129- ` Badge::BOTTOMLEFT ` - Displays the badge at the bottom left
130130- ` Badge::BOTTOMRIGHT ` - Displays the badge at the bottom right (recommended)
131+ - ` Badge::HIDDEN ` - Hides the badge completely
131132
132133### Backend Validation
133134
Original file line number Diff line number Diff line change 77use Maize \GoogleRecaptchaV3 \Enums \Badge ;
88use Maize \GoogleRecaptchaV3 \Rules \RecaptchaRule ;
99use Maize \GoogleRecaptchaV3 \Support \Config ;
10+ use Illuminate \Support \Uri ;
1011
1112class GoogleRecaptchaV3
1213{
@@ -24,7 +25,9 @@ public function boot(): void
2425 private function getJsScriptUrl (Badge $ badge ): string
2526 {
2627 return Config::getBaseJsScriptUrl ()
27- ->withQuery (['badge ' => $ badge ])
28+ ->when ($ badge !== Badge::HIDDEN , fn (Uri $ url ) => (
29+ $ url ->withQuery (['badge ' => $ badge ])
30+ ))
2831 ->value ();
2932 }
3033
You can’t perform that action at this time.
0 commit comments