Skip to content

brightfish-be/health-checks

Repository files navigation

Health checks for Laravel & Lumen

Tests Latest Version on Packagist Total Downloads

Usage

Run all your registered checks from the command line:

php artisan health:check

Or make a HTTP request to the built-in health endpoint:

curl GET https://your.app/health

Installation

Install the package with composer:

composer require brightfish/health-checks

Publish the config file:

php artisan vendor:publish --provider="Brightfish\HealthChecks\HealthServiceProvider" --tag="health-checks-config"

Create a custom health check class:

namespace App\Health\MyCustomCheck;

class MyCustomCheck extends \Brightfish\HealthChecks\Checks\AbstractCheck
{
    public function run(): bool
    {
        return false;
    }

    public function getMessage(): string
    {
        return 'Error';
    }
}

Finally, list up the class in the config file:

return [
    'checks' => [
        \App\Health\MyCustomCheck::class,
    ],
];

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

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

Credits

License

GNU General Public License (GPL). Please see License File for more information.

About

Generic health check package for Laravel

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages