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

ActiveLibrary

timfeid/slack
=============

Slack integration with PHP

1.0.1(9y ago)03.9k1MITPHPPHP &gt;=5.5.0

Since May 5Pushed 9y ago1 watchersCompare

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

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

Slack via PHP
=============

[](#slack-via-php)

This package will utilize [Slack](https://slack.com)'s [incoming webhooks](https://my.slack.com/services/new/incoming-webhook).

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

[](#requirements)

- PHP 7+
- PHP mbstring extension

Basic Usage
-----------

[](#basic-usage)

### Create a client

[](#create-a-client)

```
// Quick istantiation
$client = new TimFeid\Slack\Client('https://hooks.slack.com...');

// Instantiate with default params
$pamas = [
    'username' => 'Tim Feid',
    'channel' => '#general',
    'unfurl_media' => true,
];

$client = new TimFeid\Slack\Client('https://hooks.slack.com...', $params);
```

### Customizing a message

[](#customizing-a-message)

```
// Explicitly create a default message
$message = $client->createMessage();

// Set parameters on the message
$message->text = 'This is the text';
$message->icon = ':slack:';

// Or like this
$message['text'] = 'This is the text';

// Or using fluent methods
$message->write('This is the text')->icon(':slack:')->from('username')->to('channel');

// Create a default message from text
$message = $client->write('The text here');

// Create a message with all the parameters you wish to send
$params = [
    'username' => 'Tim Feid',
    'channel' => '#general',
    'text' => 'It\'s happening!',
    'icon' => ':poop:',
    'attachments' => [
        [
            'fallback' => 'This is fallback text',
            'text' => 'Some text on the attachment',
            'image_url' => 'http://placehold.it/320x240',
            'fields' => [
                'title' => 'Field title',
                'value' => 'Field value',
                'short' => false,
            ],
        ],
    ],
];
$message = $client->createMessage($params);
```

### Sending a message

[](#sending-a-message)

#### Send a basic, default message

[](#send-a-basic-default-message)

```
$client->send('Hello world!');
```

#### Send a message to a different channel

[](#send-a-message-to-a-different-channel)

```
$client->to('#general')->send('Hello world!');
```

#### Send a direct message with a different username

[](#send-a-direct-message-with-a-different-username)

```
$client->to('@username')->from('Bob')->send('Hello!');
```

#### Fluent sending

[](#fluent-sending)

```
// Implicitly
$message = $message->write('This is the text')->to('channel/@username')->from('username')->icon(':slack:');
$message->send();

// Explicitly
$message->to('channel/@username')->from('username')->icon(':slack:')->send('This is the text');
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3285d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8295c2fd4b99c16632e7840055b2cc6ebc454959548d4c4ccaad48588c5f25c4?d=identicon)[timfeid1](/maintainers/timfeid1)

---

Top Contributors

[![timfeid](https://avatars.githubusercontent.com/u/4679832?v=4)](https://github.com/timfeid "timfeid (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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