PHPackages                             jahmed76/laravel-slack-blocks - 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. jahmed76/laravel-slack-blocks

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

jahmed76/laravel-slack-blocks
=============================

Slack Blocks support for laravel notifications.

v2.3.2(4y ago)010MITPHPPHP ^7.1.3|^8.0

Since Mar 23Pushed 4y agoCompare

[ Source](https://github.com/jahmed76/laravel-slack-blocks)[ Packagist](https://packagist.org/packages/jahmed76/laravel-slack-blocks)[ GitHub Sponsors](https://github.com/nathanheffley)[ RSS](/packages/jahmed76-laravel-slack-blocks/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (15)Used By (0)

Laravel Slack Blocks
====================

[](#laravel-slack-blocks)

This package is an extension of the official `laravel/slack-notification-channel` package.

Usage
-----

[](#usage)

Instead of requiring the official package, you should require this one instead.

```
composer require jahmed76/laravel-slack-blocks

```

Because this package is built on top of the official one, you'll have all the functionality found in the [official docs](https://laravel.com/docs/5.8/notifications#slack-notifications).

You can follow those instructions with the slight adjustment of requiring the classes from `NathanHeffley\LaravelSlackBlocks` instead of `Illuminate\Notifications`.

Everything supported in the base Illuminate Notifications classes is supported in these extended classes.

If you want to add a block to your Slack message, you need to add the block in an attachment.

```
use NathanHeffley\LaravelSlackBlocks\Messages\SlackMessage;

// ...

public function toSlack($notifiable)
{
    return (new SlackMessage)
        ->attachment(function ($attachment) {
            $attachment->block(function ($block) {
                $block
                    ->type('section')
                    ->text([
                        'type' => 'mrkdwn',
                        'text' => '*Hello World!*',
                    ]);
            });
        });
}

```

To see all the possible fields you can add to a block, check out the [official Slack Blocks documentation](https://api.slack.com/reference/messaging/blocks).

To help, some blocks have been given dedicated helper functions on the attachment model itself. Currently there are methods for adding dividers and images.

```
(new SlackMessage)->attachment(function ($attachment) {
    $attachment->imageBlock('http://placekitten.com/300/200', 'A cute kitten');
    $attachment->dividerBlock();
    $attachment->imageBlock('http://placekitten.com/300/200', 'A cute kitten', 'This is a titled cat image');
});

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 53.3% 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 ~76 days

Recently: every ~113 days

Total

14

Last Release

1615d ago

Major Versions

1.1.x-dev → v2.0.02019-07-24

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

v2.3.0PHP ^7.1.3|^8.0

### Community

Maintainers

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

---

Top Contributors

[![nathanheffley](https://avatars.githubusercontent.com/u/8952123?v=4)](https://github.com/nathanheffley "nathanheffley (16 commits)")[![jahmed76](https://avatars.githubusercontent.com/u/10486646?v=4)](https://github.com/jahmed76 "jahmed76 (4 commits)")[![sbine](https://avatars.githubusercontent.com/u/1902973?v=4)](https://github.com/sbine "sbine (4 commits)")[![tomwelch](https://avatars.githubusercontent.com/u/1016558?v=4)](https://github.com/tomwelch "tomwelch (4 commits)")[![aarondfrancis](https://avatars.githubusercontent.com/u/881931?v=4)](https://github.com/aarondfrancis "aarondfrancis (1 commits)")[![Ashikpaul](https://avatars.githubusercontent.com/u/17526871?v=4)](https://github.com/Ashikpaul "Ashikpaul (1 commits)")

---

Tags

laravelnotificationsslackblocks

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jahmed76-laravel-slack-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/jahmed76-laravel-slack-blocks/health.svg)](https://phpackages.com/packages/jahmed76-laravel-slack-blocks)
```

###  Alternatives

[beyondcode/slack-notification-channel

Slack Notification Channel for Laravel using API tokens.

85525.8k](/packages/beyondcode-slack-notification-channel)[awssat/discord-notification-channel

Discord Notification Channel for laravel.

94122.8k](/packages/awssat-discord-notification-channel)[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)
