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

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

bc/slack-hooker
===============

simple slack webhook

01.0kPHP

Since Apr 25Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Slack Webhook Sender
===========================

[](#simple-slack-webhook-sender)

Install
-------

[](#install)

`composer require bc/slack-hooker:*`

Usage
-----

[](#usage)

```
require_once 'vendor/autoload.php';

//instantiate bc\Slack\SlackHooker with webhook url
$hooker = new bc\Slack\SlackHooker('WEBHOOK_URL');

//build message
$messageBuilder = new bc\Slack\MessageBuilder();
$messageBuilder
    ->setText("Simpe text")
    ->setUserName("Bot")
    ->setChannel('#random')
    ->setIconEmoji(':cow:');

//build attachment
$attachBuilder = new bc\Slack\AttachmentBuilder();
$attachBuilder
    ->setFallback("fallback text")
    ->setText("attachment text")
    ->setPreText("pre text")
    ->setColor("#369")
    ->setAuthorName("Author")
    ->setAuthorLink("")
    ->setAuthorIcon("")
    ->setTitle("title")
    ->setTitleLink("")
    ->addField('field1', 'value')
    ->addField('field2', 'value')
    ->addField('field3', 'value', false)
    ->setImageUrl("")
    ->setThumbUrl("");

//add attachment
$messageBuilder->attach($attachBuilder->build());

//build and add another attachment
$attachment = (new bc\Slack\AttachmentBuilder())
    ->setFallback("fallback")
    ->setText("second attachment")
    ->build();

$messageBuilder->attach($attachment);

$message = $messageBuilder->build();

//send message. returns \Psr\Http\Message\ResponseInterface
$response = $hooker->sendMessage($message);
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c966143e244c5727ff8531a586cf9ffef9e18005a0a25e2798c4576ee2dd64?d=identicon)[theinpu](/maintainers/theinpu)

---

Top Contributors

[![theinpu](https://avatars.githubusercontent.com/u/1495647?v=4)](https://github.com/theinpu "theinpu (7 commits)")

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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