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

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

antonioprimera/laravel-slack
============================

A utility for posting messages to Slack

v1.1(4y ago)0362MITPHP

Since Oct 29Pushed 4y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

AntonioPrimera - Laravel Slack Client
=====================================

[](#antonioprimera---laravel-slack-client)

This package enables users to send messages directly to slack. It is a wrapper for the Slack API, providing fluent (Laravel like) method calls.

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

[](#installation)

**Step 1.** Install package via Composer:

`composer require antonioprimera/laravel-slack`

**Step 2.** Set up a Slack WebHook and copy the webhook url.

If you don't know how to do this, check out this article:

**Step 3.** Create an environment variable with the webhook url in your .env file.

```
SLACK_WEBHOOK_URL="https://hooks.slack.com/services/.../.../..."
```

**Step 4.** That's it. You can start sending messages to Slack.

Usage
-----

[](#usage)

You can use one of the static methods on the **AntonioPrimera\\Slack\\Slack** class, or you can instantiate a **AntonioPrimera\\Slack\\SlackClient** yourself. I recommend the first option and this will be exemplified below.

The most basic usage will send a simple message to the default channel, chosen when you defined the Webhook url. For this, you can use the **post** method.

```
use AntonioPrimera\Slack\Slack;

Slack::post('This is the most basic usage, and will post a message to Slack');
```

You can fluently add several options to your message, to determine where it is sent to, the sender name, an emoji etc. The example below will post a message to the channel "#my-channel", coming from the user "Antonio" and will set the message emoji ":happy-face:".

```
use AntonioPrimera\Slack\Slack;

Slack::channel('my-channel')
    ->from('Antonio')
    ->emoji('happy-face')
    ->post('Hello Slack!');
```

You can also send a direct message to a user, by using one of the following 2 options:

```
use AntonioPrimera\Slack\Slack;

Slack::channel('james', true)
    ->from('Antonio')
    ->post('Hello James!');

Slack::from('Antonio')
    ->directMessage('james', 'Hello James!');
```

Future development
------------------

[](#future-development)

In future versions I plan to include the following:

- optionally define the default Slack channel in the .env file
- optionally define the default sender in the .env file
- optionally define the default emoji in the .env file
- send messages to multiple channels and/or users
- conditionally send messages to multiple channels and/or users

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

2

Last Release

1657d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77cac31fc31444fb45ef19e3628a7b243b5456679a9e6db635aa3b979bfdbefc?d=identicon)[AntonioPrimera](/maintainers/AntonioPrimera)

### Embed Badge

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

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

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[spatie/laravel-screenshot

Take screenshots of web pages in Laravel apps

7615.9k2](/packages/spatie-laravel-screenshot)[joaopaulolndev/filament-world-clock

Show hours around the world by timezone

3111.9k](/packages/joaopaulolndev-filament-world-clock)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

155.2k](/packages/tonegabes-filament-better-options)

PHPackages © 2026

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