silentz/akismet
A Laravel package that integrates Akismet spam detection, letting you check comments and form submissions for spam using simple validation rules and configurable API credentials to keep user-generated content clean.
composer require silentz/akismet.php artisan vendor:publish --tag=akismet-config or the provider tag — check vendor/silentz/akismet/src for the exact tag).AKISMET_API_KEY (and the site URL Akismet should associate with the key) in .env. The site URL must match the domain registered with Akismet, or every check will fail.php artisan config:clear) and confirm the key is valid before wiring it into a form.Where to look first: the package README, config/akismet.php (field mapping and API options), the service provider (what it registers), and the listener/validator that actually calls Akismet. With a package this small, reading src/ end-to-end takes minutes and is more reliable than the docs.
validate block or a listener on Statamic's FormSubmitted event. Determine which this version uses before building around it; a listener-based addon won't run if you submit programmatically without firing the event.name/email/message deliberately. Wrong mappings are the most common cause of poor detection.submit-spam / submit-ham endpoints. A few minutes of feedback per week noticeably improves accuracy for your specific form traffic.Http::fake(). Fake the Akismet endpoint returning true, false, and an error, then assert the submission is stored/flagged accordingly. Add one test for a timeout to confirm your fail-open behaviour.local and testing, and use a separate key/site for staging if you want realistic behaviour there.example.com used from staging.example.com returns invalid, and depending on the addon that may surface as "not spam" rather than an error. Log the raw response while setting up.config:clear. This bites people who add the key after deploying.true/false; errors and invalid keys can be easy to miss if the addon swallows exceptions. Add temporary logging around the client during rollout.composer.json, skim the source before upgrading Statamic major versions, and be prepared to fork. The listed last-release date is unusual — verify it against Packagist before assuming active maintenance.app/ so composer update stays safe.How can I help you explore Laravel packages today?