• Stars
    star
    88
  • Rank 375,465 (Top 8 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Monitor the health of a Laravel application

Filament Spatie Laravel Health

PHP Version Require GitHub Tests Action Status Latest Stable Version Total Downloads License

This package provides a Filament page that you can monitor the health of your application by registering checks using the spatie/laravel-health package.

Health Check Results - Filament Demo

Support For This Project

Buy Me A Coffee

Installation

You can install the package via composer:

composer require shuvroroy/filament-spatie-laravel-health

This package can store health check results in various ways. When using the EloquentHealthResultStore the check results will be stored in the database. To create the health_check_result_history_items table, you must create and run the migration.

php artisan vendor:publish --tag="health-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="filament-spatie-health-config"

This is the contents of the published config file:

return [

    /*
    |--------------------------------------------------------------------------
    | Pages
    |--------------------------------------------------------------------------
    |
    | This is the configuration for the general appearance of the page
    | in admin panel.
    |
    */

    'pages' => [
        'health' => \ShuvroRoy\FilamentSpatieLaravelHealth\Pages\HealthCheckResults::class
    ],

];

Usage

This package will automatically register the HealthCheckResults. You'll be able to see it when you visit your Filament admin panel.

Defining Resources to health check

Register Health::checks on app/Providers/AppServiceProvider.php -> boot method

<?php

namespace App\Providers;

use Spatie\Health\Facades\Health;
use Spatie\Health\Checks\Checks\OptimizedAppCheck;
use Spatie\Health\Checks\Checks\DebugModeCheck;
use Spatie\Health\Checks\Checks\EnvironmentCheck;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        Health::checks([
            OptimizedAppCheck::new(),
            DebugModeCheck::new(),
            EnvironmentCheck::new(),
        ]);
    }
}

Read the full documentation on Spatie Laravel Health

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.