reCAPTCHA with Laravel

07. Refactoring to a Blade directive

View full source code

Adding Google reCAPTCHA to a Laravel form isn’t too much trouble, but what happens when we want to re-use it for other forms?

This course focuses on setting up reCAPTCHA using Alpine.js to fetch the token, and then middleware to verify the token based on a threshold in our config. We’ll add a Blade directive too, so we’re able to easily use reCAPTCHA for any forms in our Laravel apps — just by adding a couple of lines of code.

Want to stay in the loop about new content?
Of course you do.

© 2024 Codecourse Ltd. All Rights Reserved. Born in the UK.