Back Button Techniques
Spam Prevention Techniques

Spam Prevention Techniques

If you are lucky enough to build a popular community, then your reward is a never-ending onslaught of spam. It's a simple reality; there's no getting around it. In this series, I'll show you a variety of useful techniques for preventing spam at every turn. We'll review everything from basic keyword matching, to honeypots, to reCAPTCHA.

Advanced
6 episodes
49m
6
Latest Episode in This Series

Added 4 days ago

Allow for Configuration Hooks

To wrap up this section, we'll discuss how to offer configuration and extension hooks to your...

Watch
Spam Prevention Techniques

Spam Prevention Techniques

Version: Laravel v8

If you are lucky enough to build a popular community, then your reward is a never-ending onslaught of spam. It's a simple reality; there's no getting around it. In this series, I'll show you a variety of useful techniques for preventing spam at every turn. We'll review everything from basic keyword matching, to honeypots, to reCAPTCHA.

Begin
6
Latest Episode in This Series

Added 4 days ago

Allow for Configuration Hooks

To wrap up this section, we'll discuss how to offer configuration and extension hooks to your package...
Watch

Your Teacher | Jeffrey Way

https://laracasts.s3.amazonaws.com/avatars/jeffrey-avatar.jpg's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.
  1. Section 1 Honeypot

    1. Free Episode Run Time 5:43

      Before we can review and discuss the honeypot technique, let's first quickly scaffold a basic application with authentication. Luckily, Laravel Breeze makes this a cinch.

    2. The honeypot technique is laughably simple. The basic approach involves adding a hidden input to your form. Your users will never see it, but a bot will. Once submitted to your server, you only need to check if its value is not empty. If so, you have a spammer on your hands! If you combine this with a time tracker, you should be able to prevent a sizable chunk of spam.

    3. Run Time 16:39

      At this point, we have a working example. But we've also made a big mess in the process. So let's take some time to clean up the code and make it reusable for any form.

    4. It can be useful to organize and structure new features as if you were building a package - even if you never release this package to the outside world. With that in mind, let's group all Honeypot-specific classes and components into a single namespace.

    5. At this point, you should fully understand the honeypot technique. If you'd like some extra credit, however, let's spend a little more time discussing code organization and configurability.

    6. To wrap up this section, we'll discuss how to offer configuration and extension hooks to your package users. I'll demonstrate two options: traditional inheritance and static configuration hooks.

Series still in development robot

*Series still in development. Check back often for updates.