PHPackages                             gsouillard/laravel-new-user-slack-notifier - 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. gsouillard/laravel-new-user-slack-notifier

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

gsouillard/laravel-new-user-slack-notifier
==========================================

A Laravel package to send Slack notifications on user registration.

v1.1.2(1y ago)111MITPHPPHP ^8.1

Since Aug 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Guillaume-Souillard/laravel-new-user-slack-notifier)[ Packagist](https://packagist.org/packages/gsouillard/laravel-new-user-slack-notifier)[ RSS](/packages/gsouillard-laravel-new-user-slack-notifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

Laravel New User Slack Notifier
===============================

[](#laravel-new-user-slack-notifier)

A Laravel package to send Slack notifications when a new user registers on your application.

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

[](#installation)

You can install the package via Composer:

```
composer require gsouillard/laravel-new-user-slack-notifier

```

Configuration
-------------

[](#configuration)

After installing the package, publish the configuration file:

```
php artisan vendor:publish --tag=config

```

This will create a configuration file named `slack-new-user-notifier.php` in your `config` directory.

### Configuration Options

[](#configuration-options)

- **webhook\_url**: The Slack Webhook URL where the notifications will be sent. This should be set in your `.env` file as `SLACK_NEW_USER_NOTIFIER_WEBHOOK_URL`.
- **app\_name**: The name of your application, which will be included in the Slack notification. It defaults to the `APP_NAME` defined in your `.env` file, but you can override it in the configuration file.
- **event\_to\_listen**: Determines which event to listen to. You can set this to `Registered` (default) or `Verified` to send notifications based on the specific event.

Example configuration:

```
return [
    'webhook_url' => env('SLACK_NEW_USER_NOTIFIER_WEBHOOK_URL', ''),
    'app_name' => env('APP_NAME', 'Your Application'), // Default: APP_NAME
    'event_to_listen' => env('SLACK_NEW_USER_NOTIFIER_EVENT', 'Registered'), // Default: Registered
];
```

Usage
-----

[](#usage)

This package works by listening to either the `Registered` or `Verified` events in Laravel. By default, it listens to the `Registered` event. You can change this by setting the `event_to_listen` configuration option.

In your `EventServiceProvider`, the package automatically registers the listener based on your configuration:

```
use YourNamespace\SlackNotifier\SlackNotifier;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Events\Verified;
use Illuminate\Support\Facades\Event;

class EventServiceProvider extends ServiceProvider
{
    public function boot()
    {
        parent::boot();

        $eventToListen = config('slack-new-user-notifier.event_to_listen', 'Registered');

        if ($eventToListen === 'Verified') {
            Event::listen(Verified::class, function ($event) {
                SlackNotifier::notify($event->user->email);
            });
        } else {
            Event::listen(Registered::class, function ($event) {
                SlackNotifier::notify($event->user->email);
            });
        }
    }
}
```

### Example .env Configuration

[](#example-env-configuration)

In your `.env` file, add:

```
SLACK_NEW_USER_NOTIFIER_WEBHOOK_URL=https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX
APP_NAME=My Awesome App
SLACK_NEW_USER_NOTIFIER_EVENT=Registered

```

Set `SLACK_NEW_USER_NOTIFIER_EVENT` to `Verified` if you want to send notifications only after the user verifies their email.

Testing
-------

[](#testing)

To run the tests, you can use PHPUnit:

```
vendor/bin/phpunit

```

### Commit Rules and Versioning

[](#commit-rules-and-versioning)

This project follows semantic versioning. When making changes, use the following commit message conventions to automatically update the package version:

- **Major Version Bump**: For breaking changes, include `bump:major` in your commit message.
- **Minor Version Bump**: For adding backward-compatible features, include `bump:minor` in your commit message.
- **Patch Version Bump**: For backward-compatible bug fixes or minor improvements, include `bump:patch` in your commit message.

Example commit messages:

- `Fix critical issue bump:major`
- `Add new feature bump:minor`
- `Fix minor bug bump:patch`

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~0 days

Total

4

Last Release

621d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71645c20739296a791689f86b513bcadaab9bc9dbd6888c8f4ea8965f63e643d?d=identicon)[gsouillard](/maintainers/gsouillard)

---

Top Contributors

[![Guillaume-Souillard](https://avatars.githubusercontent.com/u/30723200?v=4)](https://github.com/Guillaume-Souillard "Guillaume-Souillard (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gsouillard-laravel-new-user-slack-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/gsouillard-laravel-new-user-slack-notifier/health.svg)](https://phpackages.com/packages/gsouillard-laravel-new-user-slack-notifier)
```

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)

PHPackages © 2026

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