PHPackages                             eva-bi/laravel-slack-api - 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. eva-bi/laravel-slack-api

ActiveLibrary[API Development](/categories/api)

eva-bi/laravel-slack-api
========================

A lightweight PHP implementation of Slack's API

032PHP

Since Aug 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/eva-bi/laravel-slack-api)[ Packagist](https://packagist.org/packages/eva-bi/laravel-slack-api)[ RSS](/packages/eva-bi-laravel-slack-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

🚀 Laravel Slack API 🚀
=====================

[](#rocket-laravel-slack-api-rocket)

Lightweight Laravel 5 wrapper for the Slack Web API, including a facade and config options.

Please note that this implementation is very lightweight meaning you'll need to do some more work than usual, but in return you get a lot more flexibility. This package doesn't provide methods such as `Chat::postMessage(string $message)`, it just provides one method: `SlackApi::execute(string $method, array $parameters)`.

**👍 Reasons to use this package for the Slack API:**

- Built-in compliance with the Slack API [rate limits](https://api.slack.com/docs/rate-limits)
- Lightweight, flexible
- Modern Laravel integration
- Test coverage
- Lots of emoji in the documentation (even cats! 🐈)

🌎 Installation
--------------

[](#earth_americas-installation)

**1)** Require the package with Composer

```
composer require eva-bi/laravel-slack-web-api
```

**2)** Open `config/app.php` and add `\Tuanla\Laravel\SlackWebApi\Providers\SlackApiServiceProvider::class` to the `providers[]` array

*For example:*

```
  // ...

  'providers' => [
    // ...
    // A whole bunch of providers
    // ...

    \Tuanla\Laravel\SlackWebApi\Providers\SlackApiServiceProvider::class
  ],

  // ...
```

**3)** If you want to use the Facade, add `\Tuanla\Laravel\SlackWebApi\Facades\SlackApi::class` to the `aliases[]` array in `config/app.php`

*For example:*

```
  // ...

  'aliases' => [
    // ...
    // A whole bunch of aliases
    // ...

    'SlackApi' => \Tuanla\Laravel\SlackWebApi\Facades\SlackApi::class
  ],

  // ...
```

**4)** Publish the config file

```
php artisan vendor:publish
```

**5)** Open `config/slack.php` and insert your [token](https://api.slack.com/docs/oauth-test-tokens) to make API requests

```
'token' => 'your-token-here'
```

🍴 Usage
-------

[](#fork_and_knife-usage)

To make Slack API requests, you need to call the `execute` method of the `SlackApi` class and pass the Slack Web API method name and any parameters. For example:

```
$api->execute('method.name', [
  'parameter_one' => 'some-data',
  'parameter_two' => 'some-other-data'
  // ...
];
```

This will return a plain PHP array containing the response data from Slack.

\####**1)** Basic example of usage in a Controller:

```
use \Tuanla\Laravel\SlackWebApi\SlackApi;
use \Tuanla\Laravel\SlackWebApi\Exceptions\SlackApiException;

// ...

public function postMessage(SlackApi $api)
{
  try {
    $response = $api->execute('users.info', [
      'user' => 'U1234567890'
    ]);
    $name = $response['user']['name'];
    // Do something amazing with data from Slack...
  } catch (SlackApiException $e) {
    return 'Error:' . $e->getMessage();
  }
}

// ...
```

\####**2)** Basic usage with the Facade:

```
use \Tuanla\Laravel\SlackWebApi\Exceptions\SlackApiException;

// ...

public function postMessage()
{
  try {
    $response = SlackApi::execute('users.info', [
      'user' => 'U1234567890'
    ]);
    $name = $response['user']['name'];
    // Do something amazing with data from Slack...
  } catch (SlackApiException $e) {
    return 'Error:' . $e->getMessage();
  }
}

// ...
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% 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/3a1d59358966a5d70f4c3a03e13c32cfd5bf2c91f18852cde40b0e814a74b13d?d=identicon)[tuanbido](/maintainers/tuanbido)

---

Top Contributors

[![tuanla-dtc](https://avatars.githubusercontent.com/u/141196183?v=4)](https://github.com/tuanla-dtc "tuanla-dtc (5 commits)")[![htv-tuanla](https://avatars.githubusercontent.com/u/10717821?v=4)](https://github.com/htv-tuanla "htv-tuanla (2 commits)")

### Embed Badge

![Health badge](/badges/eva-bi-laravel-slack-api/health.svg)

```
[![Health](https://phpackages.com/badges/eva-bi-laravel-slack-api/health.svg)](https://phpackages.com/packages/eva-bi-laravel-slack-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M96](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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