Welcome to the course! In this intro episode, we kick things off by going over what you'll be building: integrating reCAPTCHA into a Laravel application, but in a way that feels totally native to Laravel.
First, we take a quick tour of the Google reCAPTCHA docs to show you just how straightforward the process actually is. We discuss the steps needed: loading the JavaScript API, executing it when you want (like on form submission), getting back a token, sending that token to the server, and finally validating it to confirm if your user's a real human or not.
You get to see a live demo of how the login page looks with reCAPTCHA fully set up — nice and clean with no extra JavaScript cluttering the Blade templates. Instead, we introduce a custom Blade directive with a touch of Alpine.js to handle form submission and token generation, keeping things super tidy and reusable.
We also check out the middleware approach for protecting routes, including setting a threshold that controls how strict the bot detection is. You see what happens when this threshold is set really high (like 1) and why 0.8 is a more sensible default.
By the end of the episode, you’ll know exactly what you’re aiming to build: a reusable way to protect any route or form in Laravel with just a simple directive and some middleware. Ready to dive in? Let's do this!