PHPackages                             nickurt/laravel-akismet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nickurt/laravel-akismet

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nickurt/laravel-akismet
=======================

Akismet for Laravel 11.x/12.x/13.x

2.3.1(2mo ago)98148.0k↓14.3%142MITPHPPHP ^8.2CI passing

Since May 27Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/nickurt/laravel-akismet)[ Packagist](https://packagist.org/packages/nickurt/laravel-akismet)[ RSS](/packages/nickurt-laravel-akismet/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (12)Versions (26)Used By (2)

Laravel Akismet
---------------

[](#laravel-akismet)

[![Build Status](https://github.com/nickurt/laravel-akismet/workflows/tests/badge.svg)](https://github.com/nickurt/laravel-akismet/actions)[![Total Downloads](https://camo.githubusercontent.com/d537766974153fc398206058fb724661f26609d3a8716c760e756474bb22e51d/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b7572742f6c61726176656c2d616b69736d65742f642f746f74616c2e737667)](https://packagist.org/packages/nickurt/laravel-akismet)[![Latest Stable Version](https://camo.githubusercontent.com/24fe3728867fa2560e02dc9f2a69e3795228d1d69ee21e888bd967855af064f2/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b7572742f6c61726176656c2d616b69736d65742f762f737461626c652e737667)](https://packagist.org/packages/nickurt/laravel-akismet)[![MIT Licensed](https://camo.githubusercontent.com/43e3687244f297f915aa406e97a94ec37021bb2204338d0aae1cbe9e0740017e/68747470733a2f2f706f7365722e707567782e6f72672f6e69636b7572742f6c61726176656c2d616b69736d65742f6c6963656e73652e737667)](LICENSE.md)

### Installation

[](#installation)

Install this package with composer:

```
composer require nickurt/laravel-akismet

```

Copy the config files for the api

```
php artisan vendor:publish --provider="nickurt\Akismet\ServiceProvider" --tag="config"

```

### Configuration

[](#configuration)

The Akismet information can be set with environment values in the `.env` file (or directly in the `config/akismet.php` file)

```
AKISMET_APIKEY=MY_UNIQUE_APIKEY
AKISMET_BLOGURL=https://my-custom-blogurl.dev

```

### Examples

[](#examples)

#### Validation Rule

[](#validation-rule)

You can use a hidden-field `akismet` in your Form-Request to validate if the request is valid

```
// FormRequest ...

public function rules()
{
    return [
        'akismet' => [new \nickurt\Akismet\Rules\AkismetRule(
            request()->input('email'), request()->input('name')
        )]
    ];
}

// Manually ...

$validator = validator()->make(['akismet' => 'akismet'], ['akismet' => [new \nickurt\Akismet\Rules\AkismetRule(
    request()->input('email'), request()->input('name')
)]]);
```

The `AkismetRule` requires a `email` and `name` parameter to validate the request.

#### Events

[](#events)

You can listen to the `IsSpam`, `ReportSpam` and `ReportHam` events, e.g. if you want to log all the `IsSpam`-requests in your application

##### IsSpam Event

[](#isspam-event)

This event will be fired when the request contains spam `nickurt\Akismet\Events\IsSpam`

##### ReportSpam Event

[](#reportspam-event)

This event will be fired when you succesfully reported spam `nickurt\Akismet\Events\ReportSpam`

##### ReportHam Event

[](#reportham-event)

This event will be fired when you succesfully reported ham `nickurt\Akismet\Events\ReportHam`

#### Custom Implementation

[](#custom-implementation)

##### Validate Key

[](#validate-key)

```
if( \Akismet::validateKey() ) {
    // valid
} else {
    // invalid
}
```

##### Set CommentAuthor Information

[](#set-commentauthor-information)

```
\Akismet::setCommentAuthor("John Doe")
    ->setCommentAuthorUrl("https://www.google.com")
    ->setCommentContent("It's me, John!")
    ->setCommentType('registration');
    // etc

// or
\Akismet::fill([
    'comment_author' => 'John Doe',
    'comment_author_url' => 'https://www.google.com',
    'comment_content' => 'It's me, John!'
]);
// etc
```

##### Is it Spam?

[](#is-it-spam)

```
if( \Akismet::isSpam() ) {
    // yes, i'm spam!
}
```

##### Submit Spam (missed spam)

[](#submit-spam-missed-spam)

```
if( \Akismet::reportSpam() ) {
    // yes, thanks!
}
```

##### Submit Ham (false positives)

[](#submit-ham-false-positives)

```
if( \Akismet::reportHam() ) {
    // yes, thanks!
}
```

### Tests

[](#tests)

```
composer test
```

---

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Recently: every ~110 days

Total

25

Last Release

89d ago

Major Versions

0.0.2 → 1.0.02016-08-23

1.13 → 2.0.02024-11-08

PHP version history (8 changes)0.0.1PHP &gt;=5.4.0

1.0.0PHP ^7.0

1.4.0PHP ^7.1.3

1.5.0PHP ^7.2

1.10.0PHP ^8.0|^7.4

1.11.0PHP ^8.0

1.12.0PHP ^8.1

1.13PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5840084?v=4)[Nick](/maintainers/nickurt)[@nickurt](https://github.com/nickurt)

---

Top Contributors

[![nickurt](https://avatars.githubusercontent.com/u/5840084?v=4)](https://github.com/nickurt "nickurt (72 commits)")[![greut](https://avatars.githubusercontent.com/u/1388?v=4)](https://github.com/greut "greut (5 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (4 commits)")[![simonfranz](https://avatars.githubusercontent.com/u/1003559?v=4)](https://github.com/simonfranz "simonfranz (2 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![bartjuh4](https://avatars.githubusercontent.com/u/245335?v=4)](https://github.com/bartjuh4 "bartjuh4 (1 commits)")[![BrookeDot](https://avatars.githubusercontent.com/u/150348?v=4)](https://github.com/BrookeDot "BrookeDot (1 commits)")[![edalzell](https://avatars.githubusercontent.com/u/6069653?v=4)](https://github.com/edalzell "edalzell (1 commits)")

---

Tags

akismetlaravellaravel-akismetspamlaravelAkismet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nickurt-laravel-akismet/health.svg)

```
[![Health](https://phpackages.com/badges/nickurt-laravel-akismet/health.svg)](https://phpackages.com/packages/nickurt-laravel-akismet)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M993](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[backpack/basset

Dead-simple way to load CSS or JS assets only once per page, when using Laravel 10+.

206971.5k11](/packages/backpack-basset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
