PHPackages                             razorpay/slack-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. razorpay/slack-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

razorpay/slack-laravel
======================

Laravel 4 and 5 integration for the razorpay/slack package, including facades and service providers.

5.0.0(2y ago)18376.4k↑503.6%3[2 issues](https://github.com/razorpay/slack-laravel/issues)[3 PRs](https://github.com/razorpay/slack-laravel/pulls)1BSD-2-ClausePHPPHP &gt;=8.1CI passing

Since Jun 25Pushed 9mo ago61 watchersCompare

[ Source](https://github.com/razorpay/slack-laravel)[ Packagist](https://packagist.org/packages/razorpay/slack-laravel)[ RSS](/packages/razorpay-slack-laravel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (1)Versions (35)Used By (1)

Slack for Laravel
=================

[](#slack-for-laravel)

This package allows you to use [Slack for PHP](https://github.com/razorpay/slack) easily and elegantly in your Laravel 4 or 5 app. Read the instructions below to get setup, and then head on over to [Slack for PHP](https://github.com/razorpay/slack) for usage details.

Requirements
------------

[](#requirements)

Laravel 4 or 5.

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

[](#installation)

You can install the package using the [Composer](https://getcomposer.org/) package manager. You can install it by running this command in your project root:

```
composer require razorpay/slack-laravel
```

Then [create an incoming webhook](https://my.slack.com/services/new/incoming-webhook) for each Slack team you'd like to send messages to. You'll need the webhook URL(s) in order to configure this package.

Laravel 5
---------

[](#laravel-5)

Add the `Razorpay\Slack\Laravel\ServiceProvider` provider to the `providers` array in `config/app.php`:

```
'providers' => [
  Razorpay\Slack\Laravel\ServiceProvider::class,
],
```

Then add the facade to your `aliases` array:

```
'aliases' => [
  ...
  'Slack' => Razorpay\Slack\Laravel\Facade::class,
],
```

Finally, publish the config file with `php artisan vendor:publish`. You'll find it at `config/slack.php`.

Laravel 4
---------

[](#laravel-4)

Add the `Razorpay\Slack\Laravel\ServiceProvider` provider to the `providers` array in `app/config.php`:

```
'providers' => [
  ...
  'Razorpay\Slack\Laravel\ServiceProvider',
],
```

Then add the facade to your `aliases` array:

```
'aliases' => [
  ...
  'Slack' => 'Razorpay\Slack\Laravel\Facade',
],
```

Finally, publish the config file with `php artisan config:publish razorpay/slack`. You'll find the config file at `app/config/packages/razorpay/slack-laravel/config.php`.

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

[](#configuration)

The config file comes with defaults and placeholders. Configure at least one team and any defaults you'd like to change.

Usage
-----

[](#usage)

The Slack facade is now your interface to the library. Any method you see being called an instance of `Razorpay\Slack\Client` is available on the `Slack` facade for easy use.

Note that if you're using the facade in a namespace (e.g. `App\Http\Controllers` in Laravel 5) you'll need to either `use Slack` at the top of your class to import it, or append a backslash to access the root namespace directly when calling methods, e.g. `\Slack::method()`.

```
// Send a message to the default channel
Slack::send('Hello world!');

// Send a message to a different channel
Slack::to('#accounting')->send('Are we rich yet?');

// Send a private message
Slack::to('@username')->send('psst!');
```

Now head on over to [Slack for PHP](https://github.com/razorpay/slack) for more examples, including attachments and message buttons.

Migrating to 2.0
================

[](#migrating-to-20)

Version 2.0 adds support for multiple slack clients. For migrating 1.X to 2.0, nest all the configuration properties inside `defaults` key in the configuration file. Configuration for additional clients can be specified in the `clients` property.

```
[
    'is_slack_enabled'  =>  true,
    'defaults'    =>  [
        // default slack client configuration.
    ],

    clients =>  [
        // Additional slack clients configuration
        'client1'   =>  [

        ]
    ]
]

```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~275 days

Total

18

Last Release

821d ago

Major Versions

1.3.10 → 2.0.02018-02-15

2.0.0 → 3.0.02021-03-31

3.0.0 → 4.0.02022-09-05

4.0.2 → 5.0.02024-04-05

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

4.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7713209?v=4)[Razorpay](/maintainers/razorpay)[@razorpay](https://github.com/razorpay)

---

Top Contributors

[![jayesh-razorpay](https://avatars.githubusercontent.com/u/59387391?v=4)](https://github.com/jayesh-razorpay "jayesh-razorpay (12 commits)")[![maknz](https://avatars.githubusercontent.com/u/992356?v=4)](https://github.com/maknz "maknz (3 commits)")[![sskop99](https://avatars.githubusercontent.com/u/146944495?v=4)](https://github.com/sskop99 "sskop99 (3 commits)")[![rajat-agarwal1](https://avatars.githubusercontent.com/u/104785816?v=4)](https://github.com/rajat-agarwal1 "rajat-agarwal1 (3 commits)")[![swati31196](https://avatars.githubusercontent.com/u/30949703?v=4)](https://github.com/swati31196 "swati31196 (2 commits)")[![naveen-s-rzp](https://avatars.githubusercontent.com/u/153058734?v=4)](https://github.com/naveen-s-rzp "naveen-s-rzp (2 commits)")[![rzp-security-svc](https://avatars.githubusercontent.com/u/173607612?v=4)](https://github.com/rzp-security-svc "rzp-security-svc (2 commits)")[![captn3m0](https://avatars.githubusercontent.com/u/584253?v=4)](https://github.com/captn3m0 "captn3m0 (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![rajeevrai](https://avatars.githubusercontent.com/u/8924921?v=4)](https://github.com/rajeevrai "rajeevrai (1 commits)")[![MahlaqaHaque](https://avatars.githubusercontent.com/u/181709188?v=4)](https://github.com/MahlaqaHaque "MahlaqaHaque (1 commits)")[![juzerali](https://avatars.githubusercontent.com/u/1373803?v=4)](https://github.com/juzerali "juzerali (1 commits)")[![ccrims0n](https://avatars.githubusercontent.com/u/4971419?v=4)](https://github.com/ccrims0n "ccrims0n (1 commits)")

---

Tags

laravelslack

### Embed Badge

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

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

###  Alternatives

[maknz/slack-laravel

Laravel 4 and 5 integration for the maknz/slack package, including facades and service providers.

157981.7k1](/packages/maknz-slack-laravel)[jeremykenedy/slack-laravel

Laravel integration for the jeremykenedy/slack package, including facades and service providers.

54766.4k](/packages/jeremykenedy-slack-laravel)[qalainau/filament-team-chat

A Slack-like team chat plugin for Filament v5

121.2k](/packages/qalainau-filament-team-chat)

PHPackages © 2026

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