Download the PHP package deftstar/support-laravel without Composer
On this page you can find all versions of the php package deftstar/support-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download deftstar/support-laravel
More information about deftstar/support-laravel
Files in deftstar/support-laravel
Package support-laravel
Short Description Turn server-side errors into Support tickets — Laravel integration. Stamps a correlation id on responses and pushes 5xx detail to your Support project. No Sentry required.
License MIT
Informations about the package support-laravel
deftstar/support-laravel
Turn server-side errors in a Laravel app into Support tickets that carry the real server detail — no Sentry required (Support is the store).
On a 5xx it stamps a correlation id on the response and buffers the exception
detail (message, class, file:line, route, method, status, user, stack) locally for
a short TTL. The detail is pushed to Support only if the user reports it — so
Support never stores errors nobody reported, and the detail stays server-side until
then. The browser's Support widget reads the id off the failed response; on report,
the frontend hits the flush endpoint and files a ticket referencing the id, and
Support joins the two so the agent sees the stack.
Install
Set two env vars:
The service provider is auto-discovered; it registers a global middleware (stamps
X-Request-Id), a reportable() callback (buffers 5xx detail), and a flush route.
No changes to your Kernel or Handler.
Protect the flush endpoint with your app's auth (default ['auth']). For an API:
How it works (report-gated)
- Middleware stamps
X-Request-Idon every response and stashes it on the request. - A
reportable()callback buffers 5xx detail in your cache (config('support.ttl')minutes), keyed by that id. It does not push. Use a shared cache (Redis) if you run multiple instances. - When a user reports, the frontend
POSTs the id to the flush route, which pushes that one buffered error to Support. Errors nobody reports are never sent and expire from the cache.
Best-effort — a Support outage never affects your app. Leave SUPPORT_SECRET_KEY empty
to disable reporting entirely.
Frontend
Pair this with the Support widget so users can turn a 500 into a ticket:
@deftstar/support-widget— the widget loader (SupportWidget.reportError(...)).@deftstar/support-angular— an Angular interceptor that offers "Report a problem" on a 5xx automatically. (Any framework can wire its own HTTP hook.)
Notes
- Requires PHP 8.1+, Laravel 10/11/12.
- Uses
app()->terminating(), notIlluminate\Support\defer()— the latter does not reliably flush under php-fpm.
All versions of support-laravel with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0