spatie/laravel-error-share
Adds a “Share” button to Laravel’s local error pages so you can generate a link and send the full exception details to a colleague for quick debugging help. Dev-only install via Composer; no setup needed.
App\Exceptions\Handler.ErrorShared event) for extensibility, enabling custom logic (e.g., filtering, enrichment) before sharing.ErrorShare::share()).App\Exceptions\Handler).composer require spatie/laravel-flare.config/flare.php (e.g., API token, environment filtering).composer require spatie/laravel-error-share.php artisan vendor:publish --provider="Spatie\ErrorShare\ErrorShareServiceProvider".config/error-share.php to define:
['local', 'staging']).['user_id']).App\Providers\ErrorShareServiceProvider if needed.abort(500)) and verify it appears in Flare.composer.json to avoid surprises.ShouldBeShared or override toErrorShareData().laravel-error-share.local, staging).laravel-error-share updates. Use composer why-not to identify conflicts.config/error-share.php and config/flare.php in a shared config repository if using multiple environments.App\Exceptions\Handler includes ErrorShare::share().500 errors).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Flare API downtime | Errors not shared; debugging hindered | Fallback to local logging + alerts. |
| Network partition | Errors not reach Flare | Queue errors locally; retry on recovery. |
| Flare rate limits exceeded | Errors dropped | Implement exponential backoff or sampling. |
| Corrupted error payload | Incomplete data in Flare | Validate payloads before sending. |
| GDPR compliance violation | Sensitive data exposed | Redact PII in production; audit payloads. |
abort(500)).user_id).How can I help you explore Laravel packages today?