josiasmontag / laravel-recaptchav3

Laravel package for Google's Recaptcha V3
MIT License
188 stars 37 forks source link

Non-static method Lunaweb\RecaptchaV3\RecaptchaV3::verify() should not be called statically #4

Closed djoey123 closed 5 years ago

djoey123 commented 5 years ago

Non-static method Lunaweb\RecaptchaV3\RecaptchaV3::verify() should not be called statically

$score = RecaptchaV3::verify($request->get('g-recaptcha-response'), 'register'); var_dump($score); die;

If i use 'g-recaptcha-response' => 'required|recaptchav3:vote,0.5', I cant post anything, it seems it doesnt detect the module

josiasmontag commented 5 years ago

Problem is that you are importing the wrong class, you are trying to use the facade here. use Lunaweb\RecaptchaV3\Facade\RecaptchaV3

djoey123 commented 5 years ago

Thank you :)

tderick commented 1 year ago

Problem is that you are importing the wrong class, you are trying to use the facade here. use Lunaweb\RecaptchaV3\Facade\RecaptchaV3

I think it is good to include this in the READ ME file. You didn't give any information on what to include