brightfish / health-checks
Simple health checks for Laravel
0.8.1
2023-04-13 16:30 UTC
Requires
- php: ^8.0
- illuminate/config: ^9.0 || ^10.6
- illuminate/console: ^9.0 || ^10.6
- illuminate/contracts: ^9.0 || ^10.6
- illuminate/routing: ^9.0 || ^10.6
- illuminate/support: ^9.0 || ^10.6
- nesbot/carbon: ^2
Requires (Dev)
- brianium/paratest: ^6.2
- friendsofphp/php-cs-fixer: ^3.16
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.24 || ^8.3
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.3
- vimeo/psalm: ^4.4
README
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.