PHPackages                             hidalgo-rides/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. [HTTP &amp; Networking](/categories/http)
4. /
5. hidalgo-rides/slack-notifier

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hidalgo-rides/slack-notifier
============================

PHP client built for integrating with Slack's Incoming Webhooks

1.0.1(6y ago)313MITPHPPHP ^7.1.3

Since Jul 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/HidalgoRides/slack-notifier)[ Packagist](https://packagist.org/packages/hidalgo-rides/slack-notifier)[ RSS](/packages/hidalgo-rides-slack-notifier/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

Slack Notifier
==============

[](#slack-notifier)

Slack Notifier utilitizes Slack's [Incoming Webhooks](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks) feature to post messages directly to a Slack channel of your choosing through your individual Slack app Webhook URL.

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

[](#installation)

These instructions assume you already have Composer installed on your machine or the server you are working on.

Install through Composer:

```
composer require timkippdev/slack-notifier
```

Usage
-----

[](#usage)

### Creating Slack App and Enabling Incoming Webhooks

[](#creating-slack-app-and-enabling-incoming-webhooks)

See the following instructions provided by Slack to create your app, if needed, and obtain your Webhook URL:

### Setup `SlackNotifier` Instance

[](#setup-slacknotifier-instance)

Once you have your Webhook URL, you can create a new instance of the `SlackNotifier` class:

```
// your Webhook URL
$webhookAPI = 'https://hooks.slack.com/services/Txxxxxx/Byyyyyyy/Zzzzzzzzz';

// new SlackNotifier instance
$slackNotifier = new \TimKippDev\SlackNotifier\SlackNotifier($webhookAPI);
```

> You can also choose to invoke the static `sendMessageToChannel` method instead of creating your own instance.

### Sending Messages

[](#sending-messages)

Now that you have your `SlackNotifier` instance created, you can use it to send a message with optional attachments to the channel configured from your Webhook URL.

#### Simple Message Using Instance Method

[](#simple-message-using-instance-method)

```
$slackNotifier->sendMessage('First message using Slack Notifier!');
```

#### Simple Message Using Static Method

[](#simple-message-using-static-method)

We provide a static method to invoke to easily send messages to different channels so you are not tied down to a single instance.

```
\TimKippDev\SlackNotifier\SlackNotifier::sendMessageToChannel($webhookAPI, 'First message using Slack Notifier!');
```

#### Message with Attachments

[](#message-with-attachments)

For the complete Slack message attachment documentation, see the following link:

```
$slackAttachment = new \TimKippDev\SlackNotifier\SlackAttachment();
$slackAttachment
    ->setAuthorName('Author name goes here')
    ->setAuthorLinkUrl('https://example.com/author')
    ->setAuthorIconUrl('https://img.icons8.com/ultraviolet/48/000000/soy.png')
    ->setColor('#222222')
    ->setFallbackText('Fallback goes here')
    ->setFooterIconUrl('https://img.icons8.com/color/48/000000/soy.png')
    ->setFooterText('Footer text goes here')
    ->setImageUrl('https://img.icons8.com/color/400/000000/soy.png')
    ->setPretext('Pretext goes here')
    ->setText('Attached using Slack Notifier!')
    ->setThumbnailUrl('https://img.icons8.com/ultraviolet/96/000000/soy.png')
    ->setTitle('Title goes here')
    ->setTitleLinkUrl('https://example.com/title');

// with instance method
$slackNotifier->sendMessage('First message with attachments using Slack Notifier!', [
    $slackAttachment
]);

// with static method
\TimKippDev\SlackNotifier\SlackNotifier::sendMessageToChannel($webhookAPI, 'First message using Slack Notifier!', [
    $slackAttachment
]);
```

#### Attachment Actions

[](#attachment-actions)

```
$slackActionConfirmation = new \TimKippDev\SlackNotifier\SlackActionConfirmation();
$slackActionConfirmation->setDismissButtonText('Dismiss')
    ->setOkButtonText('Confirm')
    ->setText('Confirmation Text')
    ->setTitle('Confirmation Title');

$slackAction = new \TimKippDev\SlackNotifier\SlackAction();
$slackAction->setStyle('primary')
    ->setType('button')
    ->setText('Click Me with Confirmation')
    ->setUrl('https://example.com/action')
    ->setName('action-name')
    ->setConfirmation($slackActionConfirmation);

$slackAttachment = new \TimKippDev\SlackNotifier\SlackAttachment();
$slackAttachment
    ->setText('Attached using Slack Notifier!')
    ->setActions([$slackAction]);

// with instance method
$slackNotifier->sendMessage('First message attachment containing actions using Slack Notifier!', [
    $slackAttachment
]);

// with static method
\TimKippDev\SlackNotifier\SlackNotifier::sendMessageToChannel($webhookAPI, 'First message using Slack Notifier!', [
    $slackAttachment
]);
```

#### Attachment Fields

[](#attachment-fields)

```
$slackField = new \TimKippDev\SlackNotifier\SlackField();
$slackField->setTitle('Field Title')
    ->setValue('Field Value');

$slackAttachment = new \TimKippDev\SlackNotifier\SlackAttachment();
$slackAttachment
    ->setText('Attached using Slack Notifier!')
    ->setFields([$slackField]);

// with instance method
$slackNotifier->sendMessage('First message attachment containing fields using Slack Notifier!', [
    $slackAttachment
]);

// with static method
\TimKippDev\SlackNotifier\SlackNotifier::sendMessageToChannel($webhookAPI, 'First message using Slack Notifier!', [
    $slackAttachment
]);
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

2

Last Release

2529d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37030721?v=4)[Tim Kipp](/maintainers/timkippdev)[@timkippdev](https://github.com/timkippdev)

---

Top Contributors

[![timkippdev](https://avatars.githubusercontent.com/u/37030721?v=4)](https://github.com/timkippdev "timkippdev (10 commits)")

---

Tags

notifierslackwebhooksincomingtimkippdev

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hidalgo-rides-slack-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/hidalgo-rides-slack-notifier/health.svg)](https://phpackages.com/packages/hidalgo-rides-slack-notifier)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[guanguans/notify

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

686111.2k8](/packages/guanguans-notify)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)

PHPackages © 2026

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