PHPackages                             rojtjo/laravel-auto-subscriber - 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. rojtjo/laravel-auto-subscriber

ActiveLibrary

rojtjo/laravel-auto-subscriber
==============================

laravel-auto-subscriber

0.4.0(1mo ago)04.6kMITPHPPHP ^8.3CI passing

Since Mar 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rojtjo/laravel-auto-subscriber)[ Packagist](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)[ Docs](https://github.com/rojtjo/laravel-auto-subscriber)[ RSS](/packages/rojtjo-laravel-auto-subscriber/feed)WikiDiscussions master Synced 1mo ago

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

laravel-auto-subscriber
=======================

[](#laravel-auto-subscriber)

[![Latest Version on Packagist](https://camo.githubusercontent.com/07c4fcdff90bcd7645123d147f54e6f4b1b5a9cdd3e5a03e1d0f18de43ca7ced/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)[![GitHub Tests Action Status](https://camo.githubusercontent.com/39ec3dd993489c124a3742009ff2b1d9ddf64d61292ac713c3f0b3fd0f680fb9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572)](https://github.com/rojtjo/laravel-auto-subscriber/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/970198eacb907bf25a9270ba35ec92e45e477ef7256aba5e633c97f573c3e9a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)

Automatically subscribe to all events for which your subscriber contains a handler. Under the hood we use reflection to detect all listeners defined on the subscriber.

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

[](#installation)

You can install the package via composer:

```
composer require rojtjo/laravel-auto-subscriber
```

Usage
-----

[](#usage)

All you have to do is use the `Rojtjo\LaravelAutoSubscriber\AutoSubscriber` trait on your subscriber class. Also make sure to register your subscriber in the `EventServiceProvider` like you're used to.

Example
-------

[](#example)

```
use Rojtjo\LaravelAutoSubscriber\AutoSubscriber;

final class UserNotifier
{
    use AutoSubscriber;

    public function welcomeUser(UserCreated $event): void
    {
        // Send welcome notification..
    }
}
```

This would equivalent to a handwritten subscriber like shown below.

```
use Illuminate\Contracts\Events\Dispatcher;

final class UserNotifier
{
    public function subscribe(Dispatcher $events)
    {
        $events->listen(UserCreated::class, [$this, 'welcomeUser']);
    }

    // ...
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Roj Vroemen](https://github.com/rojtjo)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~305 days

Recently: every ~281 days

Total

7

Last Release

56d ago

PHP version history (3 changes)0.1.0PHP ^7.4|^8.0

0.3.0PHP ^8.0

0.4.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5dc56de17326e155210bbdbc689759955974cb97f9a91642169748e3b837584?d=identicon)[Rojtjo](/maintainers/Rojtjo)

---

Top Contributors

[![rojtjo](https://avatars.githubusercontent.com/u/1123887?v=4)](https://github.com/rojtjo "rojtjo (50 commits)")

---

Tags

laraveleventsautosubscriberrojtjo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rojtjo-laravel-auto-subscriber/health.svg)

```
[![Health](https://phpackages.com/badges/rojtjo-laravel-auto-subscriber/health.svg)](https://phpackages.com/packages/rojtjo-laravel-auto-subscriber)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[pusher/pusher-http-laravel

\[DEPRECATED\] A Pusher bridge for Laravel

400509.0k3](/packages/pusher-pusher-http-laravel)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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