PHPackages                             brandonjbegle/slack-app-laravel-notification-channel - 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. brandonjbegle/slack-app-laravel-notification-channel

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

brandonjbegle/slack-app-laravel-notification-channel
====================================================

Laravel Notification Channel For Slack Apps.

v0.1.0(3y ago)08MITPHPPHP ^8.0

Since Nov 13Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Slack App Notification Channel (WIP)
====================================

[](#slack-app-notification-channel-wip)

The first-party Laravel Slack channel only supports the limited Incoming Webhooks integration. This package uses the Chat Post Message api to send a message to any channel in your workspace as long as you have the Channel ID.

I have also made a Nova 4 package to easily retrieve Slack Channel IDs for use in this package [here](https://github.com/brandonjbegle/nova-4-slack-channel-field)

This package is a WIP. Some Block types are implemented to make it easier to compose messages, but currently only one ( SectionBlock) allows (only, for now) arrays. I have provided an example Notification [here](./examples/HealthStatusChangedNotification.php)

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

[](#installation)

You can install the package in to a Laravel app that uses Nova via composer:

```
composer require brandonjbegle/slack-app-laravel-notification-channel
```

Now publish config file:

```
php artisan vendor:publish --provider="BrandonJBegle\SlackNotificationChannel\SlackAppChannelServiceProvider"
```

Create a Slack App, install it to your workspace, and retrieve your bot token. [Complete Instructions Here](./docs/SLACK.md)

Add the key and token to your `.env` file

```
SLACK_OAUTH_TOKEN=############################
```

Usage
-----

[](#usage)

### Create a notification

[](#create-a-notification)

```
class HealthStatusChangedNotification extends Notification
{
    use Queueable;

    private $site;
    private $prevStatus;
    private $newStatus;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct(Site $site, $prevStatus, $newStatus)
    {
        $this->site = $site;
        $this->prevStatus = $prevStatus;
        $this->newStatus = $newStatus;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param mixed $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [SlackAppChannel::class];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param mixed $notifiable
     * //     * @return SlackAppMessage
     */
    public function toSlackApp($notifiable)
    {
        $now = now()->setTimezone('America/New_York')->toDayDateTimeString();
        return (new SlackAppMessage())
            ->text($this->site->name . " health status changed: {$this->prevStatus} to {$this->newStatus}")
            ->blocks([
                (new HeaderBlock)
                    ->content('Health Status Changed'),
                (new ContextBlock)
                    ->elements([
                        (new ContextBlockImage)->text('text')->url('https://' . $this->site->name . '/favicon.ico'),
                        (new ContextBlockText)->type('plain_text')->content($this->site->name),
                    ]),
                (new SectionBlock)
                    ->text("Status changed from {$this->prevStatus} to {$this->newStatus}")
                    ->fields([
                        [
                            'type' => 'mrkdwn',
                            'text' => "*{$now}*"
                        ],
                    ])
            ]);
    }
}
```

### Add Notifiable trait to your model

[](#add-notifiable-trait-to-your-model)

```
class Site extends Model
{
    use Notifiable;
```

### Add routeNotificationForSlackApp method to your model

[](#add-routenotificationforslackapp-method-to-your-model)

```
public function routeNotificationForSlackApp()
    {
        // If you use the Nova 4 field, this will get the id of the Channel, otherwise simply return the id
        if ($this->slack_notification_channel) {
            return $this->slack_notification_channel['value'] ?? null ;
        }
        return null;
    }
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

1277d ago

### Community

Maintainers

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

---

Top Contributors

[![brandonjbegle](https://avatars.githubusercontent.com/u/22717872?v=4)](https://github.com/brandonjbegle "brandonjbegle (5 commits)")

---

Tags

laravelnotificationsslack

### Embed Badge

![Health badge](/badges/brandonjbegle-slack-app-laravel-notification-channel/health.svg)

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

###  Alternatives

[beyondcode/slack-notification-channel

Slack Notification Channel for Laravel using API tokens.

85525.8k](/packages/beyondcode-slack-notification-channel)[ascsoftw/livewire-toast

Livewire Package to display Toast Notifications

48544.2k1](/packages/ascsoftw-livewire-toast)[coreproc/nova-notification-feed

A Laravel Nova package that adds a notification feed in your Nova app.

10149.1k](/packages/coreproc-nova-notification-feed)[sarfraznawaz2005/laravel-sse

Laravel package to provide Server Sent Events functionality for your app.

474.6k](/packages/sarfraznawaz2005-laravel-sse)[craftpulse/craft-notifications

Send notifications across a variety of delivery channels, including mail and Slack. Notifications may also be stored in a database so they may be displayed in your web interface.

551.2k](/packages/craftpulse-craft-notifications)[usamamuneerchaudhary/filament-notifier

A powerful notification system for FilamentPHP that handles multi-channel notifications with template management, scheduling, and real-time delivery. Built for developers who need enterprise-grade notifications without the complexity.

321.1k](/packages/usamamuneerchaudhary-filament-notifier)

PHPackages © 2026

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