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 9y 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 today

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 30% 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

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k775.6M1.6k](/packages/symfony-routing)[friendsofsymfony/rest-bundle

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

2.8k72.4M299](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

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

1.3k302.1M1.1k](/packages/php-http-discovery)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k62.5M221](/packages/nelmio-api-doc-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k47.0M210](/packages/api-platform-core)[spatie/crawler

Crawl all internal links found on a website

2.8k15.7M46](/packages/spatie-crawler)

PHPackages © 2026

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