PHPackages                             zereflab/laravel-bug-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. zereflab/laravel-bug-bot

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

zereflab/laravel-bug-bot
========================

Organized Laravel exception reports for Slack, with threaded stack traces, duplicate throttling, and interactive solve/ignore actions.

v2.0.6(1mo ago)28401MITPHPPHP ^8.2

Since Jun 12Pushed 1mo agoCompare

[ Source](https://github.com/zereflab/laravel-bug-bot)[ Packagist](https://packagist.org/packages/zereflab/laravel-bug-bot)[ Docs](https://laravelbugbot.com)[ RSS](/packages/zereflab-laravel-bug-bot/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (26)Versions (8)Used By (0)

 [ ![Laravel Bug Bot](https://camo.githubusercontent.com/56addcea065f302d1ffed49931e147de17b7cc48e146a110076fa1fc683e7389/68747470733a2f2f6c61726176656c627567626f742e636f6d2f696d616765732f6c6f676f2e706e67) ](https://laravelbugbot.com)

 [![Packagist Version](https://camo.githubusercontent.com/b7165bcab92c25bce470222ea53b1f860d2429ee8a461d51b3e077df664fa7f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a657265666c61622f6c61726176656c2d6275672d626f743f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/zereflab/laravel-bug-bot) [![Packagist Downloads](https://camo.githubusercontent.com/32a95f762ddf512d6b8f880cf58285de26b4db82d3e74ba24beb0ee571b2283c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a657265666c61622f6c61726176656c2d6275672d626f743f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/zereflab/laravel-bug-bot) [![License](https://camo.githubusercontent.com/e6841ed6012fbc7b46d24eeec5047d5fcc0a4a51c4f417ffd6f5a70dbf01da31/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3265643537333f7374796c653d666f722d7468652d6261646765)](LICENSE.md)

Laravel Bug Bot
===============

[](#laravel-bug-bot)

Organized Laravel exception reports for Slack.

This package replaces noisy default Slack log messages with a clean parent alert, a full threaded exception, duplicate throttling, and Slack buttons for `Solved` / `Ignore`.

Features
--------

[](#features)

- Laravel log channel integration
- Short parent Slack message with useful context
- Full exception and stack trace in the Slack thread
- Duplicate throttling by exception fingerprint
- `Solved` and `Ignore` Slack buttons
- One click updates every stored Slack message for the same error fingerprint
- Ignored fingerprints suppress future alerts
- Safe production behavior: Slack failures do not break your app
- Test command that fails loudly when Slack config is wrong
- Designed for future Discord support

Getting Started
---------------

[](#getting-started)

### 1. Install the package

[](#1-install-the-package)

```
composer require zereflab/laravel-bug-bot
```

### 2. Publish the config

[](#2-publish-the-config)

```
php artisan vendor:publish --tag=bug-reports-config
```

### 3. Run the migrations

[](#3-run-the-migrations)

```
php artisan migrate
```

### 4. Connect Slack

[](#4-connect-slack)

Install the pre-built **Laravel Bug Bot** Slack app into your workspace — no Slack app creation needed:

 [ ![Add to Slack](https://camo.githubusercontent.com/9cd78e6d3d898fbe21e77f7400c92483e635f529f770f60f141240efcb082877/68747470733a2f2f706c6174666f726d2e736c61636b2d656467652e636f6d2f696d672f6164645f746f5f736c61636b2e706e67) ](https://laravelbugbot.com/integrations/slack/install)

Direct install URL:

After installation, the success page shows a managed bot token. Paste the generated values into your `.env`:

```
LOG_CHANNEL=bug_reports
LOG_LEVEL=error

BUG_REPORTS_SLACK_APP_MODE=managed
BUG_REPORTS_SLACK_BOT_TOKEN=xoxb-generated-token
BUG_REPORTS_SLACK_CHANNEL=C1234567890
BUG_REPORTS_SLACK_ACTIONS_ENABLED=true
```

> Managed Slack installs use `laravelbugbot.com` as the Slack Interactivity Request URL. The package embeds a signed callback in each button so Laravel Bug Bot can forward `Solved` / `Ignore` clicks back to the Laravel app where this package is installed.

### 5. Add Laravel Bug Bot to your Slack channel

[](#5-add-laravel-bug-bot-to-your-slack-channel)

Slack requires you to add the installed app to the channel before it can post alerts there.

   **1. Click the channel name**
 Open your Slack channel and click the channel name at the top.

 [![Click the Slack channel name](docs/images/slack-install/01-click-channel-name.png)](docs/images/slack-install/01-click-channel-name.png)   **2. Open Integrations**
 In the channel details modal, open the **Integrations** tab.

 [![Open the Integrations tab](docs/images/slack-install/02-open-integrations.png)](docs/images/slack-install/02-open-integrations.png)     **3. Click Add an App**
 In the Apps section, click **Add an App**.

 [![Click Add an App](docs/images/slack-install/03-add-app.png)](docs/images/slack-install/03-add-app.png)   **4. Add Laravel Bug Bot**
 Find **Laravel Bug Bot** and click **Add**.

 [![Add Laravel Bug Bot to Slack](docs/images/slack-install/04-add-laravel-bug-bot.png)](docs/images/slack-install/04-add-laravel-bug-bot.png)  ### 6. Copy the Slack channel ID

[](#6-copy-the-slack-channel-id)

Copy the Channel ID from Slack, then replace the placeholder in `BUG_REPORTS_SLACK_CHANNEL`.

 [![Copy the Channel ID from Slack](docs/images/slack-install/05-copy-channel-id.png)](docs/images/slack-install/05-copy-channel-id.png)

The channel value is the channel **ID**, not the channel name.

### 7. Test your setup

[](#7-test-your-setup)

```
php artisan bug-reports:test
```

You should see the test exception arrive in your Slack channel. That's it — every exception in your app now lands in Slack, organized.

### 8. Authorize dashboard access

[](#8-authorize-dashboard-access)

The dashboard is served by the Laravel application where you install this package:

```
/bugs-report

```

Full dashboard documentation is available at .

Edit `app/Providers/AppServiceProvider.php` and add the dashboard gate inside the `boot()` function:

```
use App\Models\User;
use Illuminate\Support\Facades\Gate;

public function boot(): void
{
    Gate::define('viewBugReports', function (User $user) {
        return $user->is_admin;
    });
}
```

Optionally, allow specific users by database ID:

```
BUG_REPORTS_DASHBOARD_USER_IDS=205,206
```

Want To Use Your Own Slack Application?
---------------------------------------

[](#want-to-use-your-own-slack-application)

If you prefer to create and control your own Slack app instead of using the managed Laravel Bug Bot app, follow the separate guide:

**[➡ Use Your Own Slack App](docs/use-your-own-slack-app.md)**

Environment Variables
---------------------

[](#environment-variables)

Defaults shown below — override only what you need:

```
BUG_REPORTS_REPORTER=slack
BUG_REPORTS_LOG_CHANNEL=bug_reports
BUG_REPORTS_CACHE_PREFIX=bug-reports
BUG_REPORTS_SLACK_APP_MODE=own
BUG_REPORTS_SLACK_INSTALL_URL=https://laravelbugbot.com/integrations/slack/install
BUG_REPORTS_SLACK_SIGNING_SECRET=
BUG_REPORTS_SLACK_USERNAME="${APP_NAME}"
BUG_REPORTS_SLACK_EMOJI=:boom:
BUG_REPORTS_SLACK_ACTIONS_ENABLED=true
BUG_REPORTS_MANAGED_ACTION_URL=
BUG_REPORTS_MANAGED_ACTION_SECRET=
BUG_REPORTS_SLACK_IGNORE_TTL_DAYS=0
BUG_REPORTS_SLACK_SOLVED_TTL_DAYS=7
BUG_REPORTS_SLACK_STORED_MESSAGES=50
BUG_REPORTS_ROUTE_PREFIX=bug-reports
BUG_REPORTS_ROUTE_MIDDLEWARE=api
BUG_REPORTS_DASHBOARD_PATH=bugs-report
BUG_REPORTS_DASHBOARD_MIDDLEWARE=web,auth
BUG_REPORTS_DASHBOARD_GATE=viewBugReports
BUG_REPORTS_DASHBOARD_USER_IDS=
```

After changing config:

```
php artisan config:clear
php artisan config:cache
```

What The Slack Alert Looks Like
-------------------------------

[](#what-the-slack-alert-looks-like)

Parent message:

- Date/time
- Log level
- Exception class
- Exact exception message
- Origin: command, job, controller, route action, or application class
- Entity/user/model information when detectable
- File and line
- `Solved` and `Ignore` buttons

Thread reply:

- Exception class
- Message
- Location
- Level
- Environment
- Request details when available
- Context
- Stack trace
- Previous exception when available

Solved And Ignore
-----------------

[](#solved-and-ignore)

Each exception gets a fingerprint based on exception class, message, file, and line.

- `Ignore` suppresses future alerts for that same fingerprint.
- `Solved` marks the fingerprint as resolved and clears the throttle.
- In managed Slack app mode, button clicks go to `laravelbugbot.com` first, then get forwarded to a signed callback endpoint in your Laravel app.
- In own Slack app mode, Slack can post directly to your Laravel app's signed action endpoint.
- Both actions update stored report state for that same fingerprint.
- If a solved fingerprint happens again, it is reopened as pending.

Bug reports, occurrence counts, statuses, and Slack message references are stored in the database. By default, ignored errors are ignored forever. You can expire ignored errors:

```
BUG_REPORTS_SLACK_IGNORE_TTL_DAYS=30
```

### Slack button endpoint

[](#slack-button-endpoint)

The package automatically registers the Slack interactivity endpoint:

```
POST /bug-reports/slack/actions

```

By default this route uses the `api` middleware and is also registered without Laravel's CSRF middleware, because Slack cannot send a Laravel CSRF token. You should not add this route manually.

To avoid 404s from the common dashboard/action URL mismatch, the package also registers compatibility aliases:

```
POST /bugs-report/slack/actions
POST /bug-report/slack/actions
POST /bugs-reports/slack/actions
POST /{BUG_REPORTS_DASHBOARD_PATH}/slack/actions

```

If Slack reaches Laravel but `BUG_REPORTS_SLACK_SIGNING_SECRET` is missing or wrong, the endpoint returns `401 Invalid signature` instead of `404`.

Managed Slack app installs also automatically register this client callback endpoint:

```
POST /bug-reports/managed/actions

```

Laravel Bug Bot signs each Slack button value with `BUG_REPORTS_MANAGED_ACTION_SECRET` (defaults to `APP_KEY`) and includes this callback URL. When Slack sends the click to `laravelbugbot.com`, Laravel Bug Bot forwards the action to this endpoint so the package can update the local database.

Make sure `APP_URL` is correct in the Laravel app where the package is installed. If auto-detection is wrong, set:

```
BUG_REPORTS_MANAGED_ACTION_URL=https://your-app.com/bug-reports/managed/actions
```

If you use your own Slack app and want Slack `Solved` / `Ignore` buttons, set the Slack app's **Interactivity Request URL** to your deployed Laravel app:

```
https:///bug-reports/slack/actions

```

If you change `BUG_REPORTS_ROUTE_PREFIX`, the URL changes too. For example:

```
BUG_REPORTS_ROUTE_PREFIX=internal/bug-reports
```

Then Slack must post to:

```
https:///internal/bug-reports/slack/actions

```

Dashboard
---------

[](#dashboard)

The package includes a built-in dashboard served inside your Laravel application:

```
/bugs-report

```

Read the full dashboard guide at .

The dashboard shows:

- Total error fingerprints and total occurrences
- Errors received in the last 1, 5, 7, 10, and 30 days
- Pending, resolved, and ignored counts
- Noisiest origins and exception classes
- Paginated tables for all, pending, resolved, and ignored errors
- Resolve, ignore, and delete actions

Change the dashboard path:

```
BUG_REPORTS_DASHBOARD_PATH=internal/bugs
```

### Dashboard authorization

[](#dashboard-authorization)

**The dashboard denies everyone by default.** To grant access, edit `app/Providers/AppServiceProvider.php` and add the gate inside the `boot()` function:

```
use App\Models\User;
use Illuminate\Support\Facades\Gate;

public function boot(): void
{
    Gate::define('viewBugReports', function (User $user) {
        return $user->is_admin;
    });
}
```

Or allow specific user IDs without defining a gate:

```
BUG_REPORTS_DASHBOARD_USER_IDS=1,42
```

Add authentication middleware so visitors are sent to login first:

```
BUG_REPORTS_DASHBOARD_MIDDLEWARE=web,auth
```

Production Notes
----------------

[](#production-notes)

Use this in production:

```
APP_DEBUG=false
LOG_CHANNEL=bug_reports
BUG_REPORTS_LEVEL=error
BUG_REPORTS_THROTTLE_MINUTES=5
```

Do not use Laravel's default `slack` channel if you want this package's formatting. Use `bug_reports`.

Future Discord Support
----------------------

[](#future-discord-support)

The package is structured around reporter drivers. Slack is the first reporter. Discord can be added later with the same fingerprinting, summary formatting, threaded/detail behavior where supported, and solved/ignore state.

License
-------

[](#license)

MIT

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance92

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

40d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/280809540?v=4)[ZEREFLAB](/maintainers/zereflab)[@zereflab](https://github.com/zereflab)

---

Top Contributors

[![Akash4686](https://avatars.githubusercontent.com/u/36274335?v=4)](https://github.com/Akash4686 "Akash4686 (21 commits)")[![Hamaad616](https://avatars.githubusercontent.com/u/46200983?v=4)](https://github.com/Hamaad616 "Hamaad616 (1 commits)")

---

Tags

laravelloggingslackexceptionserror-trackingbug-reports

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zereflab-laravel-bug-bot/health.svg)

```
[![Health](https://phpackages.com/badges/zereflab-laravel-bug-bot/health.svg)](https://phpackages.com/packages/zereflab-laravel-bug-bot)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M134](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M139](/packages/laravel-pulse)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k30.2M151](/packages/laravel-cashier)[flarum/core

Delightfully simple forum software.

211.4M2.4k](/packages/flarum-core)

PHPackages © 2026

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