Laravel SDK
Documentation Coming Soon
This documentation page is being written. Check back soon or contact us for help.
Installation
composer require stackwatch/laravel-sdk
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=stackwatch-config
Add your API key to your .env file:
STACKWATCH_API_KEY=your-api-key-here
STACKWATCH_ENVIRONMENT=production
Usage
The SDK automatically captures exceptions. You can also manually report errors:
<?php
use StackWatch\Laravel\Facades\StackWatch;
// Report an exception
StackWatch::captureException($exception);
// Report a message
StackWatch::captureMessage('Something happened', 'info');
// Add context
StackWatch::setUser([
'id' => auth()->id(),
'email' => auth()->user()->email,
]);