spatie/laravel-error-share
Adds a “Share” button to Laravel exception pages so you can generate a link and let teammates view the full error details without screen sharing. Install as a dev dependency and share local exceptions instantly.
App\Exceptions\Handler). Fits seamlessly into Laravel’s error reporting stack (e.g., render(), report() methods).error-share.blade.php) and a share button to Laravel’s default error page. No database or external API dependencies beyond Flare.illuminate.exception event, ensuring real-time error capture without manual instrumentation.>12.29). Backward compatibility with Laravel 11 likely exists but untested.spatie/laravel-flare).--dev, avoiding production bloat. Safe for CI/CD pipelines or local development but not production.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Flare Dependency | High | Validate Flare setup pre-integration; test error sharing locally. |
| Laravel Version Mismatch | Medium | Pin Laravel version in composer.json to match package support. |
| View Compilation Issues | Low | Follow Spatie’s Laravel 12+ fixes. |
| Security (Error Exposure) | Medium | Ensure Flare’s IP whitelisting is configured to restrict access. |
| Performance Impact | Low | Minimal; only active during error rendering. |
spatie/laravel-flare (v1.0+), PHP 8.1+.composer require spatie/laravel-flare --dev
.env and service provider (config/app.php).composer require spatie/laravel-error-share --dev
php artisan vendor:publish --tag=error-share-views
abort(500) in a route).--dev flag is retained in production.| Component | Compatibility Notes |
|---|---|
| Laravel 12/13 | Explicitly supported; active fixes for edge cases. |
| Laravel 11 | Unverified; may work but lacks official support. |
| Flare v1.0+ | Required; older versions may break sharing functionality. |
| Blade Templating | Custom views must extend error-share layout. |
| CI/CD | Safe for pipelines (dev-only); no runtime impact. |
laravel-error-share in local/dev environments.@error-shared Slack channel).spatie/laravel-flare for breaking changes.php artisan vendor:publish).App\Exceptions\Handler includes ShareError..env config (APP_URL, FLARE_ID).composer dump-autoload or update Laravel.php artisan flare:debug).config:clear if view changes aren’t reflecting.Symfony\Component\HttpKernel\Exception\NotFoundHttpException).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Flare service unavailable | Share button broken | Fallback: Manual error screenshots (e.g., php artisan screenshot). |
| Laravel version incompatibility | Package fails to load | Pin Laravel version in composer.json. |
| View compilation errors | Share button non-functional | Run composer dump-autoload; check Laravel logs. |
| Flare misconfiguration | Errors not shared | Validate .env (FLARE_ID, APP_URL). |
| Production enablement | Accidental error exposure | Restrict to staging only; use IP whitelisting in Flare. |
How can I help you explore Laravel packages today?