laravel-status-client maintained by cboxdk
Description
Cbox Status for Laravel: read a status page's public JSON with origin fallback, freshness and signed emergency notices, and show incident and maintenance banners in any app.
Author
Last update
2026/11/09 18:27
(dev-main)
License
Downloads
1
Tags
Cbox Status
Cbox Status for Laravel. Read a Cbox Status page's public JSON from any Laravel app, and show its active incidents, maintenance and emergency notices as banners in your own layout.
- Typed value objects for
current.json(contractcbox-status/v1) - The page's own origin first, then fallback mirrors
- Freshness from the heartbeat's age
- Ed25519 emergency notices, verified with libsodium against keys you configure
- A short cache with stale-if-error
<x-cbox-status::banner />for Blade,Status::shared()for InertiaFakeStatusandInteractsWithStatusfor your testsphp artisan status:check
It reads only public files. It has no API key and never talks to the Cbox Status control plane.
The contract is additive, so a page may use a status, state or impact this version does
not know yet. The client still reads that page: the value becomes Unknown (never
"operational"), and the raw string stays available, e.g. $component->statusValue.
Install
composer require cboxdk/laravel-status-client
CBOX_STATUS_PAGE=01m708vt2qwrtpzk61e80vaby8
CBOX_STATUS_URL=https://cbox.cboxstatus.com
CBOX_STATUS_FALLBACKS=https://data.cboxstatus.com
# Optional: public keys from the page's "Emergency keys"
CBOX_STATUS_EMERGENCY_KEYS=
<x-cbox-status::banner />
Inertia::share('status', fn () => \Cbox\StatusClient\Facades\Status::shared());
$report = Status::report();
$report->available(); // a snapshot was read (now or from the cache)
$report->stale; // the heartbeat is older than stale_after_seconds
$report->indicator(); // ComponentStatus::Operational, …
$report->activeIncidents(); // list<Incident>
$report->emergency?->message; // a verified emergency notice
Testing
use Cbox\StatusClient\Snapshot\IncidentImpact;
$this->fakeStatus()->withIncident('Sign-in is slow', IncidentImpact::Minor);
Documentation
docs/index.md. Start with the Quickstart.
Quality gate
composer qa # pint, phpstan (max), pest, license check, audit, SBOM drift
License
MIT. See LICENSE.md.