zanichelli / healthcheck
Health check package provides security target for the project
Installs: 1 487
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 0
Open Issues: 2
Requires
- laravel/framework: ^5.6|^6|^7|^8|^9|^10|^11|^12
- league/flysystem-aws-s3-v3: ^1.0@dev|^2.0@dev|^3.0@dev
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2025-07-06 10:58:44 UTC
README
Introduction
This package has the purpose to add in laravel project an api route (/api/health
).
There are various possible system checks:
- Database status (
db
) - Availability local filesystem (
filesystem.local
) - Aws S3 filesystem connection (
filesystem.s3
)
Installation
First install laravel project if you don't have yet.
Then install healthcheck package using composer:
cd laravel-project
composer require zanichelli/healthcheck
Follow the template-file to include param about the package.
Note:
Default config vaule is null
Customization
It is possible edit package configurations:
php artisan vendor:publish --tag=config #create package config file inside own config folder php artisan vendor:publish --tag=resources #publish messages views inside resources folder
Add params in config file (healthcheck.php
) to add more db connections or s3 bucket connections , e.g.:
'db' => [ [ 'connection' => env('DB_CONNECTION', null) ], [ 'connection' => env('ORACLE_CONNECTION', null) ], [ 'connection' => env('REDIS_CONNECTION', null) ] ],
Testing
You can run tests from the project where the package was installed, remember to use the PHPUnit binary located in healthcheck vendor directory. Assuming you have installed the package in the Example project, you can run the following commands:
docker exec -it example_app bash
cd vendor/zanichelli/healthcheck
composer install
vendor/bin/phpunit