- How do I install shuvroroy/filament-spatie-laravel-health in Laravel?
- Install the package with Composer using composer require shuvroroy/filament-spatie-laravel-health. Publish Filament assets with php artisan filament:assets. If you use EloquentHealthResultStore, also publish and run the health migrations. Then register the plugin in your Filament PanelProvider.
- Do I need spatie/laravel-health installed to use this Filament plugin?
- Yes. This package is a Filament presentation layer over spatie/laravel-health and does not implement health checks, scheduling, alerting, or result storage itself. Install and configure Spatie Health first so the page has results to display. Without Spatie Health, the plugin does not deliver monitoring value.
- Which Filament and Laravel versions is this package compatible with?
- Recent releases include compatibility work for Filament 5, Laravel 13, and PHP 8.5, but exact constraints depend on the package version. Check the Composer requirements and changelog against your application's Filament major, Laravel version, PHP version, and Spatie Health version. Pin the package and include Filament and Spatie upgrades in CI to catch incompatibilities early.
- How do I register the plugin in my Filament panel?
- In your PanelProvider, such as AdminPanelProvider, add ->plugin(FilamentSpatieLaravelHealthPlugin::make()) to the panel definition. Publish Filament assets afterward with php artisan filament:assets. The plugin then registers the health check page inside that panel.
- How do I store health check results in the database with this plugin?
- Use Spatie Health's EloquentHealthResultStore and publish the health migrations with php artisan vendor:publish --tag="health-migrations". Run php artisan migrate to create the health_check_result_history_items table. The Filament page reads from the configured Spatie result store, so the migration must exist when using the Eloquent store.
- How do I restrict who can view the health check page in Filament?
- Use the plugin's authorize() method in your PanelProvider to enforce a gate or policy. Without authorization configuration, anyone who can access the Filament panel may see health details. Define which roles should see operational health data and restrict access accordingly.
- Why is my Filament health check page showing stale or missing results?
- The page only displays results that Spatie Health has stored. Ensure php artisan health:check is scheduled and running in that environment. Also confirm the configured result store matches what the page reads and that the health results migration has been run.
- How do I register the actual health checks shown on the page?
- Register checks via Health::checks([...]) in AppServiceProvider, following the Spatie Laravel Health documentation. The Filament plugin does not define checks itself. After registering checks and running health:check, the results appear on the Filament health page.
- Does this package send alerts when a health check fails?
- No. It only adds a dashboard page for viewing Spatie Health results and does not implement alerting. Use Spatie Health's notification features or external monitoring for Slack, email, PagerDuty, or similar channels. Treat alerting as a separate production operations concern.
- How do I customize the health check page navigation label or heading?
- You can extend the HealthCheckResults page class to customize the navigation icon, heading, or group. The plugin supports extension for navigation and heading customization. Keep customizations in your application code so package upgrades remain manageable.