Open rashcms opened 7 years ago
I have the same issue. Looks like some of the class names used in the RecaptchaServiceProvider class are incorrect, both with the AliasLoader and in the use statements.
I managed to resolve this issue by changing few lines in the RecaptchaServiceProvider. It seems the error was in the order of the arguments in the call to the AliasLoader.
Change
AliasLoader::getInstance()->alias('\Recaptcha\Facade\RecaptchaFacade', 'Recaptcha');
to
AliasLoader::getInstance()->alias('Recaptcha', '\Recaptcha\Facade\RecaptchaFacade');
Change
use App\RecaptchaLaravel\Core\RecaptchaClient;
use App\RecaptchaLaravel\Facade\RecaptchaFacade;
use App\RecaptchaLaravel\Validator\RecaptchaValidator;
to
use RecaptchaLaravel\Core\RecaptchaClient;
use RecaptchaLaravel\Facade\RecaptchaFacade;
use RecaptchaLaravel\Validator\RecaptchaValidator;
EDIT:
If you use the Facade in your Blade template, don't forget to add
<script src="https://www.google.com/recaptcha/api.js"></script>
to your template.
This instruction is omitted in the README.md
Hi How to use laravel recaptcha in laravel version 5.3 ? ErrorException in AliasLoader.php line 66: Class '\Recaptcha\Facade\RecaptchaFacade' not found