PHPackages                             matthewbdaly/laravel-error-snapshot - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. matthewbdaly/laravel-error-snapshot

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

matthewbdaly/laravel-error-snapshot
===================================

Stores errors from both the client and server side in a consistent format to aid debugging

0.0.4(8y ago)020MITPHP

Since Nov 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/matthewbdaly/laravel-error-snapshot)[ Packagist](https://packagist.org/packages/matthewbdaly/laravel-error-snapshot)[ RSS](/packages/matthewbdaly-laravel-error-snapshot/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (5)Used By (0)

laravel-error-snapshot
======================

[](#laravel-error-snapshot)

[![Build Status](https://camo.githubusercontent.com/8fdb4f939296d83dc9c2c4dcc7f04942de1882d3b3fc4569082d3d9e62b80fd6/68747470733a2f2f7472617669732d63692e6f72672f6d6174746865776264616c792f6c61726176656c2d6572726f722d736e617073686f742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/matthewbdaly/laravel-error-snapshot)[![Coverage Status](https://camo.githubusercontent.com/99447d91a8f115d5c7f2f560fa825deb72e2ff2dbf744ddfc087850febf063f5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6174746865776264616c792f6c61726176656c2d6572726f722d736e617073686f742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/matthewbdaly/laravel-error-snapshot?branch=master)

Stores errors from both the client and server side in a consistent format to aid debugging.

Use case
--------

[](#use-case)

With the rise of single-page web apps, many modern web apps have moved functionality that was previously handled on the server side to the client side. This is not without its advantages, but it means that many errors that may occur are locked up in the user's web browser where they can't easily be reported and fixed.

This package provides an API endpoint for Laravel applications that accepts a stack trace for an error, as well as an optional representation of the application state and a meta field for other data. It works by triggering an event when a request is received, and the event listener persists the data to the database.

You can also trigger this event yourself if you wish to capture a server-side exception. This allows for storing all of your exceptions in one place for easier management.

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

[](#installation)

```
$ composer require matthewbdaly/laravel-error-snapshot
```

Usage
-----

[](#usage)

This package exposes an API endpoint at `/api/snapshot`. If you want to store an error that occurs on the client side, you should make a `POST` request to that endpoint with the following parameters:

- `trace` - The full stack trace of the error (required).
- `state` - The JSON representation of the application state. This is primarily for cases where you're using a data store such as Redux or Vuex.
- `meta` - A JSON representation of any other data you would like to store to help with debugging, such as the current route, a JSON web token or shopping cart state

If the user is logged in, the user ID will also be captured automatically.

For server-side applications, you should instead trigger the event `Matthewbdaly\LaravelErrorSnapshot\Events\SnapshotCaptured` and pass the same data into the constructor as an array:

```
$data = [
    'trace' => $trace,
    'state' => $state,
    'meta' => $meta,
    'user_id' => Auth::user()->id,
];
event(new SnapshotCaptured($data));
```

You'll probably want to do this in your main exception handler in most cases.

Viewing snapshots
-----------------

[](#viewing-snapshots)

As viewing snapshots is going to be application-specific, there are no views, controllers or routes for displaying them. You should implement this functionality yourself. There is already a repository included that you can use to retrieve the snapshots - just typehint `Matthewbdaly\LaravelErrorSnapshot\Contracts\Repositories\Snapshot` to retrieve it.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a596e5052494181ddc20aedefbebef191cc81008e320df098608c54a1dea7350?d=identicon)[matthewbdaly](/maintainers/matthewbdaly)

---

Top Contributors

[![matthewbdaly](https://avatars.githubusercontent.com/u/450801?v=4)](https://github.com/matthewbdaly "matthewbdaly (51 commits)")

---

Tags

errorlaravelphpreportingsnapshotlaravelsnapshoterror

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/matthewbdaly-laravel-error-snapshot/health.svg)

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

###  Alternatives

[facade/ignition

A beautiful error page for Laravel applications.

2.1k102.2M333](/packages/facade-ignition)[spatie/laravel-ignition

A beautiful error page for Laravel applications.

566146.7M471](/packages/spatie-laravel-ignition)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

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