PHPackages                             renoki-co/laravel-healthchecks - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. renoki-co/laravel-healthchecks

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

renoki-co/laravel-healthchecks
==============================

Laravel Healthchecks is a simple controller class that helps you build your own healthchecks endpoint without issues.

2.1.0(4y ago)5755.0k↓85.7%6[4 PRs](https://github.com/renoki-co/laravel-healthchecks/pulls)Apache-2.0PHPCI passing

Since May 27Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/renoki-co/laravel-healthchecks)[ Packagist](https://packagist.org/packages/renoki-co/laravel-healthchecks)[ Docs](https://github.com/renoki-co/laravel-healthchecks)[ GitHub Sponsors](https://github.com/rennokki)[ RSS](/packages/renoki-co-laravel-healthchecks/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (7)Versions (14)Used By (0)

Laravel Healthchecks
====================

[](#laravel-healthchecks)

[![CI](https://github.com/renoki-co/laravel-healthchecks/workflows/CI/badge.svg?branch=master)](https://github.com/renoki-co/laravel-healthchecks/workflows/CI/badge.svg?branch=master)[![codecov](https://camo.githubusercontent.com/1c8390ff2b45a2d9ef53b47401ad1311462cf22e087fdb0352cbb27252b64e74/68747470733a2f2f636f6465636f762e696f2f67682f72656e6f6b692d636f2f6c61726176656c2d6865616c7468636865636b732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/renoki-co/laravel-healthchecks/branch/master)[![StyleCI](https://camo.githubusercontent.com/db892bec7b825d7a187292a9b9a6194a77190939d7d946cc979bebe648e2dd74/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236343131313339342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/264111394)[![Latest Stable Version](https://camo.githubusercontent.com/b99623d12c5488454c505ff5a3cba58193bbef3d86bfe59f5c6392dedb513bbf/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6865616c7468636865636b732f762f737461626c65)](https://packagist.org/packages/renoki-co/laravel-healthchecks)[![Total Downloads](https://camo.githubusercontent.com/dbbd2e29eeb149feceb21e72688263d358b17279c461478192689ca5145e38c6/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6865616c7468636865636b732f646f776e6c6f616473)](https://packagist.org/packages/renoki-co/laravel-healthchecks)[![Monthly Downloads](https://camo.githubusercontent.com/0040f32d028be7edcbd070ed80b9658e286b45c7525a772895b62b583ff3a317/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6865616c7468636865636b732f642f6d6f6e74686c79)](https://packagist.org/packages/renoki-co/laravel-healthchecks)[![License](https://camo.githubusercontent.com/a3595d1fb10d808981c8982efdefbcfccb6b652c5a44531fe889724ceefe690c/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6865616c7468636865636b732f6c6963656e7365)](https://packagist.org/packages/renoki-co/laravel-healthchecks)

Laravel Healthchecks is a simple controller class that helps you build your own healthchecks endpoint without issues.

🤝 Supporting
------------

[](#-supporting)

**If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with [Github Sponsors](https://github.com/sponsors/rennokki). 📦**

[![](https://camo.githubusercontent.com/fc371963da8e366593b1d2b522fb7f2cf6b88e85f1e8ef8aef95f70757e60c38/68747470733a2f2f6769746875622d636f6e74656e742e73332e66722d7061722e7363772e636c6f75642f7374617469632f33312e6a7067)](https://github-content.renoki.org/github-repo/31)

🚀 Installation
--------------

[](#-installation)

You can install the package via composer:

```
composer require renoki-co/laravel-healthchecks
```

🙌 Usage
-------

[](#-usage)

First of all, you should create your own Controller for healthchecks, that extends the `RenokiCo\LaravelHealthchecks\Http\Controllers\HealthcheckController`.

```
use Illuminate\Http\Request;
use RenokiCo\LaravelHealthchecks\Http\Controllers\HealthcheckController;

class MyHealthcheckController extends HealthcheckController
{
    /**
     * Register the healthchecks.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return void
     */
    public function registerHealthchecks(Request $request)
    {
        $this->addHealthcheck('mysql', function (Request $request) {
            // Try testing the MySQL connection here
            // and return true/false for pass/fail.

            return true;
        });
    }
}
```

```
// In your routes
Route::get('/healthcheck', [MyHealthcheckController::class, 'handle']);
```

Registering healthchecks
------------------------

[](#registering-healthchecks)

Within the controller, you should register the healthchecks closures in the `registerHealthchecks` method, like the example stated above.

You can add as many healthchecks as you want.

```
public function registerHealthchecks(Request $request)
{
    $this->addHealthcheck('mysql', function (Request $request) {
        //
    });

    $this->addHealthcheck('redis', function (Request $request) {
        //
    });

    $this->addHealthcheck('some_check', function (Request $request) {
        //
    });

    $this->addHealthcheck('another_check_here', function (Request $request) {
        //
    });
}
```

Status Codes
------------

[](#status-codes)

In case of failure, the response is `500`. For all successful responses, the status code is `200`.

To change the http codes being sent out, specify this in your `registerHealthchecks` method:

```
public function registerHealthchecks(Request $request)
{
    $this->setPassingHttpCode(203);

    $this->setFailingHttpCode(403);

    $this->addHealthcheck('mysql', function (Request $request) {
        return true;
    });
}
```

Outputs
-------

[](#outputs)

By default, the output will be `OK` or `FAIL` as string, but in case you want to debug the healthchecks, you can get a JSON with each registered healthchecks and their pass/fail closures.

You have just to call `withOutput()`:

```
public function registerHealthchecks(Request $request)
{
    $this->withOutput();

    $this->addHealthcheck('mysql', function (Request $request) {
        return true;
    });

    $this->addHealthcheck('redis', function (Request $request) {
        return false;
    });
}
```

The output in the browser would be like this:

```
{
    "mysql": true,
    "redis": false
}
```

🐛 Testing
---------

[](#-testing)

```
vendor/bin/phpunit
```

🤝 Contributing
--------------

[](#-contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

🔒 Security
----------

[](#--security)

If you discover any security related issues, please email  instead of using the issue tracker.

🎉 Credits
---------

[](#-credits)

- [Alex Renoki](https://github.com/rennokki)
- [All Contributors](../../contributors)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance50

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 74.8% 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 ~78 days

Recently: every ~130 days

Total

9

Last Release

1606d ago

Major Versions

1.3.1 → 2.0.02021-04-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21983456?v=4)[rennokki](/maintainers/rennokki)[@rennokki](https://github.com/rennokki)

---

Top Contributors

[![rennokki](https://avatars.githubusercontent.com/u/21983456?v=4)](https://github.com/rennokki "rennokki (86 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (23 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

controllerhealthcheckhealthcheckshealthchecks-endpointlaravellaravel-healthchecksphproutesserverwebphplaravelservercheckscontrollerendpointhealthcheck

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/renoki-co-laravel-healthchecks/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)[hasinhayder/tyro-login

Tyro Login - Beautiful, customizable authentication views for Laravel 12 &amp; 13

2464.9k6](/packages/hasinhayder-tyro-login)

PHPackages © 2026

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