Laravel Installation
LaraBug's Laravel SDK ships as a Composer package. It supports Laravel 6 through 13 on PHP 7.4 and newer.
Install the package
composer require larabug/larabug
Publish the config file
php artisan vendor:publish --provider="LaraBug\ServiceProvider"
This creates config/larabug.php. You can edit it to change the reported environments, the deduplication window, which fields get scrubbed, and the queue monitoring behavior. See Configuration for the full reference.
Set your credentials
Add your keys to .env:
LB_KEY=your-login-key
LB_PROJECT_KEY=your-project-key
Or, if you prefer a single DSN string:
LB_DSN=https://login_key:project_key@www.larabug.com/api/log
The DSN takes precedence if both are set. You'll find both keys on your project page at larabug.com.
Register as a log channel
LaraBug registers itself as a Monolog driver. Open config/logging.php and add it to your default stack channel:
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'larabug'],
'ignore_exceptions' => false,
],
'larabug' => [
'driver' => 'larabug',
],
// ...
],
From this point on, every unhandled exception caught by Laravel's default error handler gets forwarded to LaraBug. You don't have to change your exception handler, and you don't have to manually call report() anywhere — Laravel's existing reporting flow handles it.
Verify
Run the test command to confirm everything's wired up:
php artisan larabug:test
You should see a success message in the terminal and a new exception in your LaraBug dashboard within a few seconds. If the command hangs or errors, jump to Troubleshooting.
Next steps
- Configuration — tune environments, rate limits, and data filtering
- Capturing Exceptions — manual capture, custom context, and advanced usage
- Queue & Job Monitoring — track background jobs alongside exceptions