PHPackages                             nwilging/laravel-slack-bot - 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. [API Development](/categories/api)
4. /
5. nwilging/laravel-slack-bot

ActiveLibrary[API Development](/categories/api)

nwilging/laravel-slack-bot
==========================

A robust Slack messaging integration for Laravel

2.1.3(2y ago)1838.3k↓10.5%2[5 PRs](https://github.com/nwilging/laravel-slack-bot/pulls)MITPHPPHP &gt;=7.4CI passing

Since Apr 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nwilging/laravel-slack-bot)[ Packagist](https://packagist.org/packages/nwilging/laravel-slack-bot)[ RSS](/packages/nwilging-laravel-slack-bot/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (16)Used By (0)

Laravel Slack Bot
=================

[](#laravel-slack-bot)

[![Tests](https://github.com/nwilging/laravel-slack-bot/actions/workflows/main-branch.yml/badge.svg?branch=main)](https://github.com/nwilging/laravel-slack-bot/actions/workflows/main-branch.yml/badge.svg?branch=main)[![Coverage](./.github/coverage-badge.svg)](./.github/coverage-badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/208ca9929a90e17b6228afc371b1c0b023cce20b8142f06556666b51f575c9da/687474703a2f2f706f7365722e707567782e6f72672f6e77696c67696e672f6c61726176656c2d736c61636b2d626f742f76)](https://packagist.org/packages/nwilging/laravel-slack-bot)[![License](https://camo.githubusercontent.com/780be6dd200fcb548f5c3d988bc874d27eda95a06eecce9a00d804f6ac81e65b/687474703a2f2f706f7365722e707567782e6f72672f6e77696c67696e672f6c61726176656c2d736c61636b2d626f742f6c6963656e7365)](https://packagist.org/packages/nwilging/laravel-slack-bot)[![Total Downloads](https://camo.githubusercontent.com/9de8876ac3c7d0830bcf47daf5ebaa17363e00aec65e3fa8b3583139602b0243/687474703a2f2f706f7365722e707567782e6f72672f6e77696c67696e672f6c61726176656c2d736c61636b2d626f742f646f776e6c6f616473)](https://packagist.org/packages/nwilging/laravel-slack-bot)

A robust Slack messaging integration for Laravel

---

### About

[](#about)

While Slack Incoming Webhooks are powerful, direct API interaction is powerful-er - or something like that.

This package leverages Slack [bot tokens](https://api.slack.com/authentication/token-types#bot) to interact with the Slack API. This allows the integration to do things such as search channels and post messages - both plain and rich text - to any channel\* in a workspace.

*\* any public channel, or private channel that the Slack App bot is a member of*

---

Installation
============

[](#installation)

### Pre Requisites

[](#pre-requisites)

1. Laravel v8+
2. PHP 7.4+

### Install with Composer

[](#install-with-composer)

```
composer require nwilging/laravel-slack-bot

```

### Usage with `laravel/slack-notification-channel`

[](#usage-with-laravelslack-notification-channel)

If your app uses the default first-party Laravel package, [laravel/slack-notification-channel](https://github.com/laravel/slack-notification-channel), this package will conflict with the first-party one. This package is configured by default to use the channel `slack` in your `via()` method.

**If you wish to use this package *alongside* `laravel/slack-notification-channel`**, simply add the following to your `.env`:

```
SLACK_API_DRIVER_NAME=slackBot

```

You may replace `slackBot` with any driver name you'd like. The driver will be instantiated with that name and you can provide it to your `via()` method. This will allow you to use both this package and `laravel/slack-notification-channel` at the same time.

**Example:**

```
