alfasix / alfakit-health
Show spatie/laravel-health check results in an AlfaKit panel: a health page, a refresh action and a dashboard widget.
Requires
- php: ^8.4
- alfasix/alfakit: ^0.1|@dev
- spatie/laravel-health: ^1.30
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
by Alfa Six
This is a read-only split of the AlfaKit monorepo. Please open issues and pull requests there.
Spatie Laravel Health for AlfaKit panels: a Health page with the latest result of every check, a refresh action that runs the checks, and an optional dashboard widget summarising failures. It renders in React, Vue and Svelte with AlfaKit's built-in components.
Installation
composer require alfasix/alfakit-health
Install spatie/laravel-health, register your checks and a result store, and register the plugin:
use AlfaSix\AlfakitHealth\HealthPlugin; $panel->plugin( HealthPlugin::make() ->dashboardWidget() ->authorize(fn (User $user): bool => $user->is_admin), );
The page is at /{panel}/health.
Usage
- A card per check: label, short summary, message, status colour and icon.
- A details table with each check's status, summary, message and meta values.
- Refresh runs
health:check --no-notification(notifyOnRefresh()sends spatie's notifications). dashboardWidget()addsHealthStatusWidget: "All checks passed", or the failing checks, linking to the page.
Other options: usingPage(), usingPollingInterval(), navigationGroup(), navigationLabel(), navigationIcon(), navigationSort(), registerNavigation(). See the documentation.
License
MIT. See LICENSE.md.