PHPackages                             letsgoi/laravel-health-check - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. letsgoi/laravel-health-check

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

letsgoi/laravel-health-check
============================

Laravel health checker

4.0.0(1y ago)730.1k↓39%1MITPHPPHP ^8.3CI passing

Since May 22Pushed 1y ago4 watchersCompare

[ Source](https://github.com/letsgoi/laravel-health-check)[ Packagist](https://packagist.org/packages/letsgoi/laravel-health-check)[ Docs](https://github.com/letsgoi/laravel-health-check)[ RSS](/packages/letsgoi-laravel-health-check/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Laravel Health Check
====================

[](#laravel-health-check)

Package to perform health check analysis based on defined checkers.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Laravel &gt;= 10.0

Instalation
-----------

[](#instalation)

- Require package with composer:

```
composer require letsgoi/laravel-health-check
```

- Publish configuration:

```
php artisan vendor:publish --provider="Letsgoi\HealthCheck\HealthCheckServiceProvider" --tag="config"
```

Service Provider will be automatically registered, however if you want to add it manually, you must add this to your `config/app.php` file:

```
'providers' => [
    // ...
    Letsgoi\HealthCheck\HealthCheckServiceProvider::class,
];
```

Configuration
-------------

[](#configuration)

You must set all checkers that want to pass your application at checkers array on config file (`config/laravel_health_check.php`):

```
'checkers' => [
    ...
    Letsgoi\HealthCheck\Checkers\DatabaseConnectionChecker::class,
    Letsgoi\HealthCheck\Checkers\WritablePathsChecker::class,
    ...
],
```

You can check any checker without check all, but this configuration is for general check.

Usage
-----

[](#usage)

### Check individual checker

[](#check-individual-checker)

Use `HealthCheck` facade to check an individual checker:

```
use Letsgoi\HealthCheck\Facades;

HealthCheck::check(new Checker());
```

it will return `true` if check pass and it will throw `HealthCheckerException` if not.

### Check all checkers defined at configuration file

[](#check-all-checkers-defined-at-configuration-file)

To check all checkers defined at configuration file use `healthCheck` method of `HealthCheck` facade:

```
use Letsgoi\HealthCheck\Facades;

HealthCheck::healthCheck();
```

it will return `true` if all checks pass and throw `HealthCheckerException` with failed checkers if not.

### Get check errors

[](#get-check-errors)

If you want to get all check errors of checkers defined at configuration file, you can use `getCheckErrors` method:

```
use Letsgoi\HealthCheck\Facades;

HealthCheck::getCheckErrors();
```

It returns an array with all errors.

### HealthCheck command

[](#healthcheck-command)

You can run the healthcheck with artisan command:

```
php artisan health-check
```

It show ok if all checks pass or exceptions if fails.

### HealthCheck endpoint

[](#healthcheck-endpoint)

You can configure an endpoint to check the health of your app. Configure it on config file (`laravel_health_check`):

```
...

'endpoint' => [
    'enabled' => env('HEALTH_CHECK_ENDPOINT_ENABLED', true), // Enable/disable endpoint

    'path' => env('HEALTH_CHECK_ENDPOINT_PATH', '/health-check'), // Configure path of endpoint

    'healthy_message' => env('HEALTH_CHECK_ENDPOINT_HEALTHY_MESSAGE', 'Healthy'), // Set ok message
],

...
```

It will return the ok message if all check passed or a server error with the array of errors.

Checkers
--------

[](#checkers)

### Available checkers

[](#available-checkers)

Those are the available predefined checkers:

- `Letsgoi\HealthCheck\Checkers\AppKeyChecker`: Checks if there is an app key defined as environment variable.
- `Letsgoi\HealthCheck\Checkers\DatabaseConnectionChecker`: Checks if the app can connect with default database connection.
- `Letsgoi\HealthCheck\Checkers\DatabaseMigrationsChecker`: Checks if all migrations are up to date.
- `Letsgoi\HealthCheck\Checkers\DebugChecker`: Checks if the app is not on debug mode.
- `Letsgoi\HealthCheck\Checkers\EnvFileChecker`: Checks if there is an .env file.
- `Letsgoi\HealthCheck\Checkers\WritablePathsChecker`: Checks if the necessary paths are writable.

### Custom checkers

[](#custom-checkers)

If you need some custom checker (or someone not available yet, PRs are welcome :)), you can do simply implementing the `Letsgoi\HealthCheck\Contracts\HealthChecker` contract.

It forces to implement a `check` method that returns `true` if check pass or `false` if not.

Then you can use normally adding to your config file or checking it with individual mode.

Testing
-------

[](#testing)

Run tests:

```
composer test
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](./LICENSE)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance44

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~249 days

Recently: every ~306 days

Total

8

Last Release

446d ago

Major Versions

0.2.0 → 1.0.02020-09-29

1.2.0 → 2.0.02023-05-10

2.0.0 → 3.0.02024-07-10

3.0.0 → 4.0.02025-02-27

PHP version history (4 changes)0.1.0PHP &gt;=7.2

1.1.0PHP ^7.2|^8.0

2.0.0PHP ^8.1

3.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/21895df4b67dd1b486aa23eee404be73842e53660da0cb4d6e43037462fece48?d=identicon)[letsgoi](/maintainers/letsgoi)

---

Top Contributors

[![marcoocram](https://avatars.githubusercontent.com/u/6926933?v=4)](https://github.com/marcoocram "marcoocram (2 commits)")

---

Tags

laravelcheckhealthhealth checkgoiletsgoi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/letsgoi-laravel-health-check/health.svg)

```
[![Health](https://phpackages.com/badges/letsgoi-laravel-health-check/health.svg)](https://phpackages.com/packages/letsgoi-laravel-health-check)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
