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 1mo 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 27% 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

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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