PHPackages                             svilborg/laravel-health - 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. [Framework](/categories/framework)
4. /
5. svilborg/laravel-health

ActiveProject[Framework](/categories/framework)

svilborg/laravel-health
=======================

Laravel Health Check

v1.6.1(6y ago)38[13 PRs](https://github.com/svilborg/laravel-health/pulls)MITPHP

Since Jul 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/svilborg/laravel-health)[ Packagist](https://packagist.org/packages/svilborg/laravel-health)[ RSS](/packages/svilborg-laravel-health/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (10)Versions (29)Used By (0)

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

[](#laravel-health-check)

[![Build Status](https://camo.githubusercontent.com/30373d33d0939c35ae7025fe411d4aca843c1cea36b2cec661885aa124e1800d/68747470733a2f2f7472617669732d63692e6f72672f7376696c626f72672f6c61726176656c2d6865616c74682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/svilborg/laravel-health)[![Coverage](https://camo.githubusercontent.com/f591ec2b497ccb053397bd63cb444808cc350b5665a89acae3db54f82cb09766/68747470733a2f2f636f6465636f762e696f2f67682f7376696c626f72672f6c61726176656c2d6865616c74682f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/svilborg/laravel-health)[![Quality Score](https://camo.githubusercontent.com/8259477bea6a95e26bc37757c69c25e8fda8216788e5aeb01e950972d6e8b9f0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7376696c626f72672f6c61726176656c2d6865616c74682e737667)](https://scrutinizer-ci.com/g/svilborg/laravel-health)[![Latest Stable Version](https://camo.githubusercontent.com/479b07f48c97758d6a805cbb768dc633b2d2cb593bf3baee4c14a76e14f71e70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7376696c626f72672f6c61726176656c2d6865616c74682e737667)](https://packagist.org/packages/svilborg/laravel-health)[![License](https://camo.githubusercontent.com/9df2f16da5eef7431f7d0f63442febbd3f1603577d7bdd2d876eef2f43d22947/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7376696c626f72672f6c61726176656c2d6865616c74682e737667)](https://github.com/svilborg/laravel-health/blob/master/LICENSE)

Implementation of MicroProfile Health for Laravel

[MicroProfile Health Protocol](https://github.com/eclipse/microprofile-health/blob/master/spec/src/main/asciidoc/protocol-wireformat.adoc "Protocol")

### Configuration

[](#configuration)

Register the health check classes in config/health.php

```
    return [
        /*
         * |--------------------------------------------------------------------------
         * | Health Checks
         * |--------------------------------------------------------------------------
         * |
         */

        'checks' => [
             [
                 'class' => \Health\Checks\NullCheck::class,
                 'params' => []
             ],
             [
                 'class' => \Health\Checks\Servers\Database::class,
                 'params' => []
             ],
             [
                 'class' => \Health\Checks\Filesystem\DiskSpace::class,
                 'params' => [
                    'path' => '/'
                 ]
             ],
             [
                'class' => \Health\Checks\Env\Environment::class,
                'params' => [
                     'APP_ENV' => 'testing'
                 ]
             ]
        ]
    ];
```

Add the api route

```
    Route::get('/health', 'Health\Controllers\HealthController@check');
```

### Example Response Payload

[](#example-response-payload)

```
{
    "status": "UP",
    "checks": [
        {
            "name": "health-checks-null-check",
            "status": "UP",
            "data": []
        },
        {
            "name": "health-checks-filesystem-disk-space",
            "status": "UP",
            "data": {
                "free_bytes": 119100669952,
                "free_human": "110.92 GB",
                "path": "/",
                "threshold": 100000000
            }
        },
        {
            "name": "health-checks-env-environment",
            "status": "UP",
            "data": {
                "variable": "APP_ENV",
                "value": "testing",
                "value_expected": "testing"
            }
        },
        {
            "name": "health-checks-filesystem-directory-is-readable",
            "status": "UP",
            "data": {
                "paths": [
                    "../tests"
                ]
            }
        },
        {
            "name": "health-checks-filesystem-file-is-readable",
            "status": "UP",
            "data": {
                "files": [
                    "TestCase.php"
                ]
            }
        }
    ]
}
```

### Custom Health Check

[](#custom-health-check)

```
    use Health\Checks\BaseCheck;
    use Health\Checks\HealthCheckInterface;

    class ServiceACheck extends BaseCheck implements HealthCheckInterface
    {

        /**
         *
         * {@inheritdoc}
         * @see \Health\Checks\HealthCheckInterface::call()
         */
        public function call()
        {
            $health = $this->getBuilder('Service A');

            if(!$this->serviceA->connect()) {
                $health->withData('error', 'Service A Failed')
                        ->down();
            }
            else {
                $health->up();
            }

            return $health->build();
        }
    }
```

### Health Check Cli Command

[](#health-check-cli-command)

```
$ php artisan health

    ✔ UP Health State
    ==============================

    ✔ UP health-checks-null-check
    ✔ UP health-checks-filesystem-disk-space {"free_bytes":119302803456,"free_human":"111.11 TB","path":"\/tmp","threshold":100000000}
    ✔ UP health-checks-env-environment {"variable":"APP_ENV","value":"testing","value_expected":"testing"}
    ✔ UP health-checks-filesystem-directory-is-readable {"paths":[".\/tests"]}
    ✔ UP health-checks-filesystem-file-is-readable {"files":[".\/tests\/TestCase.php"]}

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 81% 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 ~4 days

Recently: every ~12 days

Total

15

Last Release

2441d ago

Major Versions

v0.9.0 → v1.0.02019-07-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db646b4e4a625b138b9b1cb5d5aad0f16c3fe35bbcacadd5fe788782f99df71?d=identicon)[svilborg](/maintainers/svilborg)

---

Top Contributors

[![svilborg](https://avatars.githubusercontent.com/u/2757518?v=4)](https://github.com/svilborg "svilborg (145 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (34 commits)")

---

Tags

apihealthhealth-checkhealthcheck-endpointhealthcheck-protocoljsonlaravelmicroprofile-healthphpframeworklaravelhealthhealth check

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)

PHPackages © 2026

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