Bugsnag Laravel

Report Laravel and Lumen exceptions and crashes to Bugsnag with rich diagnostic context.

SDK
Composer
vv2.30.0
903stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
60/100Good
Development Activity44
Maintenance32
Community76
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture80
Code Quality82
Innovation76
Learning Curve82

Bugsnag Laravel is the official Bugsnag notifier for the Laravel and Lumen PHP frameworks. It gives you instant notification of unhandled exceptions and crashes in production, while also letting you report handled exceptions manually with Bugsnag::notify().

The package integrates through a service provider and Laravel’s logging channels, automatically capturing stack traces, request metadata, and user information. It attaches custom diagnostic data so you can understand how many users are affected by a given error and prioritize fixes accordingly.

What You Get

  • Automatic reporting of unhandled exceptions and fatal crashes
  • A Bugsnag facade with notify() for reporting handled exceptions
  • Integration as a Laravel logging channel and monolog handler
  • User identification and custom diagnostic metadata attachment
  • Support for queues, Laravel Octane, and out-of-memory bootstrapping

Common Use Cases

  • Monitoring production Laravel apps for uncaught exceptions in real time
  • Reporting caught exceptions with extra context from within business logic
  • Tracking which users and requests are affected by a recurring error

Under The Hood

Architecture - A BugsnagServiceProvider binds the underlying bugsnag/bugsnag PHP client into the container and registers a Bugsnag facade. It plugs into Laravel’s exception handler and Monolog stack via LaravelLogger/MultiLogger, with middleware (under src/Middleware) enriching each report with request and session context, and dedicated hooks for queues (src/Queue) and Octane (OctaneEventSubscriber).

Tech Stack - Written in PHP (with Blade views for config publishing) and built on the framework-agnostic bugsnag/bugsnag notifier, illuminate/support, and illuminate/contracts. It supports both Laravel and Lumen and covers Laravel Octane and out-of-memory scenarios via an OomBootstrapper.

Code Quality - The repo maintains a substantial PHPUnit suite plus Gherkin/Cucumber end-to-end feature tests and Dockerized maze-runner scenarios, reflecting a mature, well-tested vendor-maintained integration with StyleCI enforcement.

API Design - The public surface is deliberately small: install the provider, set an API key, and either rely on automatic capture or call Bugsnag::notify(). Configuration is publishable and documented, keeping onboarding to a few minutes.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search