Download the PHP package ipunkt/laravel-healthcheck without Composer
On this page you can find all versions of the php package ipunkt/laravel-healthcheck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ipunkt/laravel-healthcheck
More information about ipunkt/laravel-healthcheck
Files in ipunkt/laravel-healthcheck
Package laravel-healthcheck
Short Description configurable healthcheck route for laravel
License MIT
Informations about the package laravel-healthcheck
Laravel Health Check
configurable healthcheck route for laravel
Install
composer require ipunkt/laravel-healthcheck
If you are using laravel 5.5 or above you do not have to add the provider manually. We support the package discovery.
Add the \Ipunkt\LaravelHealthcheck\HealthcheckProvider::class,
to your providers
section in config/app.php
.
php artisan vendor:publish --provider "Ipunkt\LaravelHealthcheck\HealthcheckProvider"
Usage
Edit the config file config/healthcheck.php
see the comments there for more information
Available checkers
database
Tests database connections via Eloquentstorage
Tests write access to filesystem pathsredis
Tests for accessing redis queue servicesolr
Tests for accessing solr services (needs extra package solarium/solarium)
Extend
To add a new Healthchecker implement Ipunkt\LaravelHealthcheck\HealthChecker\Checker
and register it with the
Ipunkt\LaravelHealthcheck\HealthChecker\Factory\HealthcheckerFactory
.
The HealtcheckerFactory is registered as singleton so you can use App::make()
to retrieve it in the boot
part of a
ServiceProvider and register your Checker.
HealthcheckerFactory::register
- string $identifier - the identifier which will activate the checker when added to
config('healthcheck.checks')
- Closure function(array $config) { return new Checker; } - Callback to make the Checker. Receives
$config('healthcheck.$identifier')
as parameter.
Example
All versions of laravel-healthcheck with dependencies
illuminate/database Version ^5.0 || ^6.0 || ^7.0 || ^8.0