PHPackages                             syropian/laravel-notification-channel-throttling - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. syropian/laravel-notification-channel-throttling

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

syropian/laravel-notification-channel-throttling
================================================

Throttle notifications on a per-channel basis

v1.0.3(2mo ago)92.7k↓50%1[1 PRs](https://github.com/syropian/laravel-notification-channel-throttling/pulls)MITPHPPHP ^8.2CI passing

Since Nov 19Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/syropian/laravel-notification-channel-throttling)[ Packagist](https://packagist.org/packages/syropian/laravel-notification-channel-throttling)[ Docs](https://github.com/syropian/laravel-notification-channel-throttling)[ RSS](/packages/syropian-laravel-notification-channel-throttling/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (28)Versions (7)Used By (0)

 [![Laravel Notification Channel Throttling](/art/github_header.png)](/art/github_header.png)🚦 Laravel Notification Channel Throttling
=========================================

[](#-laravel-notification-channel-throttling)

Throttle your Laravel notifications on a per-channel basis

 [![Latest Version on Packagist](https://camo.githubusercontent.com/f0edcfe168d3f86c896ca5b1afa48d9ffbe0701ed28868fab3913769dd31aa42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7379726f7069616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d7468726f74746c696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syropian/laravel-notification-channel-throttling) [![GitHub Tests Action Status](https://camo.githubusercontent.com/b61b2fa2d09c5a8c5a45da0b4568f86748d97e871df518ba935c5680b1bd591b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7379726f7069616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d7468726f74746c696e672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/syropian/laravel-notification-channel-throttling/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://camo.githubusercontent.com/a520da21584c2b159e1bc6cabcd06abcb9bb74fda54ab3742d9b5da2fa1167d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7379726f7069616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d7468726f74746c696e672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/syropian/laravel-notification-channel-throttling/actions?query=workflow%3A) [![Total Downloads](https://camo.githubusercontent.com/4859ff309abe90fca10cd88961a713290f4f32c01b2987cc9fae7f4ed88dd011/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7379726f7069616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2d7468726f74746c696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syropian/laravel-notification-channel-throttling)

Introduction
------------

[](#introduction)

When sending notifications through multiple channels (say email and SMS), you may want to throttle the number of notifications sent through a specific channel. For example, you could limit the number of SMS notifications sent to a user to 1 per day, and limit emails to 5 per day. This package allows you to configure this easily directly in your notification classes.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require syropian/laravel-notification-channel-throttling
```

Compatibility
-------------

[](#compatibility)

This package supports Laravel 10, 11, 12, and 13.

Laravel 13 requires PHP 8.3. The package still supports PHP 8.2 for Laravel 10, 11, and 12.

Usage
-----

[](#usage)

1. Ensure the notification you want to throttle implements `Syropian\LaravelNotificationChannelThrottling\Contracts\ThrottlesChannels`.
2. Implement the `throttleChannels` method. This method should return an array of channels to throttle, and the configuration for each channel. To omit a channel from throttling either omit the channel from the array, or set the value to `false`.

```
use Illuminate\Notifications\Notification;
use Syropian\LaravelNotificationChannelThrottling\Contracts\ThrottlesChannels;

class ExampleNotification extends Notification implements ThrottlesChannels {
    // ...

    public function throttleChannels(object $notifiable, array $channels): array
    {
        /**
         * Throttle the mail channel, so that only one
         * email notification is sent every 15 minutes
         */
        return [
            'mail' => [
                'maxAttempts' => 1,
                'decaySeconds' => 900,
            ],
            'database' => false,
        ];
    }
}
```

Scoping the rate limiter
------------------------

[](#scoping-the-rate-limiter)

By default, the [rate limiter](https://laravel.com/docs/rate-limiting) instance used to throttle is automatically scoped to the notification and channel. If you would like to further scope the rate limiter, you may pass a `key` to the channel configuration.

```
public function __construct(public Post $post) {}

public function throttleChannels(object $notifiable, array $channels): array
{
    return [
        'mail' => [
            'key' => $notifiable->id . ':' . $this->post->id,
            'maxAttempts' => 1,
            'decaySeconds' => 900,
        ],
        'database' => false,
    ];
}
```

In this example we're rate limiting the mail channel, and we're scoping it to a specific combination of a user and a post.

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Collin Henderson](https://github.com/syropian)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance87

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% 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 ~280 days

Total

4

Last Release

62d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d6d4c1f225a17021e0c4a3c79652273f456b3a743b639f205589084906f4283?d=identicon)[syropian](/maintainers/syropian)

---

Top Contributors

[![syropian](https://avatars.githubusercontent.com/u/749061?v=4)](https://github.com/syropian "syropian (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelnotificationsrate-limitingthrottlinglaravelnotificationthrottlingrate limitingsyropian

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/syropian-laravel-notification-channel-throttling/health.svg)

```
[![Health](https://phpackages.com/badges/syropian-laravel-notification-channel-throttling/health.svg)](https://phpackages.com/packages/syropian-laravel-notification-channel-throttling)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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