PHPackages                             debugcat/laravel - 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. debugcat/laravel

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

debugcat/laravel
================

Official DebugCat SDK for Laravel — capture exceptions and ship them to your DebugCat project.

v0.2.0(1mo ago)00MITPHPPHP ^8.2

Since May 29Pushed 1mo agoCompare

[ Source](https://github.com/getdebugcat/laravel)[ Packagist](https://packagist.org/packages/debugcat/laravel)[ RSS](/packages/debugcat-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

DebugCat SDK for Laravel
========================

[](#debugcat-sdk-for-laravel)

The official Laravel SDK for [DebugCat](https://debugcat.co) — capture exceptions in your Laravel app and ship them to your DebugCat project for grouping, alerting, and triage.

Inspired by the architecture of Spatie's Flare client: a small framework-agnostic core (`Report` → context providers → transport) wired into Laravel's exception handler.

How it works
------------

[](#how-it-works)

```
Throwable ──► DebugCat::report() ──► Report (built from backtrace)
                                       │
                  context providers ───┤  request · user · environment/release
                                       │
                      beforeSend hooks ┤  your custom mutations
                                       │
                              Transport ──► POST debugcat.co/api/ingest
                                            header: X-DebugCat-Key

```

Unhandled exceptions are reported automatically — the service provider registers a `reportable` callback on Laravel's exception handler, so you don't touch `bootstrap/app.php`.

Installation
------------

[](#installation)

```
composer require debugcat/laravel
php artisan vendor:publish --tag=debugcat-config   # optional
```

The service provider and `DebugCat` facade are auto-discovered.

Configuration
-------------

[](#configuration)

Add your project's ingest key (shown once when you create the project in DebugCat):

```
DEBUGCAT_KEY=your-40-char-project-key
DEBUGCAT_ENABLED=true
DEBUGCAT_ENVIRONMENTS=production,staging      # report only from these (empty = all)
DEBUGCAT_RELEASE="${APP_VERSION}"            # optional deploy/commit marker
DEBUGCAT_QUEUE=false                          # true = send via the queue
```

All options live in `config/debugcat.php`.

Verify your setup
-----------------

[](#verify-your-setup)

```
php artisan debugcat:test
```

This sends a deliberate test exception. It should appear in your DebugCat project within seconds.

Manual reporting
----------------

[](#manual-reporting)

```
use DebugCat\Laravel\Facades\DebugCat;

try {
    riskyOperation();
} catch (\Throwable $e) {
    // Report a caught exception without re-throwing it.
    DebugCat::report($e);
}

// Attach one-off context to a specific report.
DebugCat::report($e, function (\DebugCat\Laravel\Report $report) {
    $report->setLevel('warning')
        ->mergeContext(['order_id' => $order->id]);
});

// Log an ad-hoc message (no exception).
DebugCat::reportMessage('Payment webhook arrived out of order', 'warning');
```

### Global enrichment

[](#global-enrichment)

Add context to every report from a service provider's `boot()`:

```
use DebugCat\Laravel\Facades\DebugCat;

DebugCat::beforeSend(function (\DebugCat\Laravel\Report $report) {
    $report->mergeContext(['tenant' => tenant()?->id]);
});
```

What gets sent
--------------

[](#what-gets-sent)

Each occurrence matches DebugCat's ingest contract:

FieldSource`exception_class``get_class($throwable)``message``$throwable->getMessage()``level``error` by default; override per-report`stack_trace[]``file`, `line`, `function`, `class`, `in_app`, `code_snippet``context`url, http method, user agent, ip, environment, release, body`user`id, email, name of the authenticated user`occurred_at`ISO-8601 timestampFrames inside your `base_path` (excluding `/vendor/`) are flagged `in_app`; those frames drive issue grouping on the server and are the only ones that carry source snippets.

Privacy &amp; censoring
-----------------------

[](#privacy--censoring)

Sensitive fields (`password`, `token`, `secret`, …) are redacted from the request body, headers, and user payload before anything leaves your app. Extend the list in `config/debugcat.php` under `censor.fields`, or set `send_request_body` to `false` to omit request input entirely.

Reliability
-----------

[](#reliability)

Reporting never throws into your application and never blocks it for long: HTTP calls use a short timeout, all failures are swallowed, and you can offload delivery to the queue with `DEBUGCAT_QUEUE=true`.

Testing
-------

[](#testing)

```
composer install
./vendor/bin/pest
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

56d ago

### Community

Maintainers

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

---

Top Contributors

[![antoinedesp](https://avatars.githubusercontent.com/u/114112600?v=4)](https://github.com/antoinedesp "antoinedesp (1 commits)")

---

Tags

laravelmonitoringexceptionserror-trackingdebugcat

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/debugcat-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

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

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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