PHPackages                             alfan06/laravel-healthcheck - 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. alfan06/laravel-healthcheck

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

alfan06/laravel-healthcheck
===========================

0.5.1(11mo ago)02MITPHP

Since Jun 9Pushed 11mo agoCompare

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

READMEChangelog (8)DependenciesVersions (10)Used By (0)

Laravel Healthcheck
===================

[](#laravel-healthcheck)

This package provides a simple healthcheck endpoint for your Laravel application.

[![Import Action](https://raw.githubusercontent.com/alfan06/laravel-healthcheck/master/docs/healthcheck.png)](https://raw.githubusercontent.com/alfan06/laravel-healthcheck/master/docs/healthcheck.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require alfan06/laravel-healthcheck
```

Publish the config file:

```
php artisan vendor:publish --provider="Alfan06\LaravelHealthcheck\HealthcheckServiceProvider"
```

Usage
-----

[](#usage)

Once installed, you can access the healthcheck endpoint at `/healthcheck`.

You can configure the path in the `config/healthcheck.php` file along with specifying which services you want to check.

```
// config/healthcheck.php
return [

    'path' => 'healthcheck',

    'database' => true,

    'redis' => true,

    'horizon' => true,

    'scheduler' => false,

];
```

### Cron Job / Scheduler

[](#cron-job--scheduler)

If you want to check if the scheduler is running, you should add the following to your scheduler in `app/Console/Kernel.php`:

```
$schedule->call(function () {
    Cache::put('scheduler_last_run', now());
})->everyMinute();
```

This will update the cache key `scheduler_last_run` every minute. The healthcheck will check if this key has been updated in the last 2 minutes.

### Logging for Cloudwatch

[](#logging-for-cloudwatch)

The healthcheck will log the status of the checks if there is an unavailable service. The logs will contain the status of the service and the message through the `context` of the log.

Example log in JSON:

```
{
    "origin": "app.web",
    "message": "Scheduler is not running.",
    "context": {
        "is_scheduler_running": false,
        "last_run": "2024-03-25 05:26:01",
        "include_in_metrics": false
    },
    "level": 400,
    "level_name": "ERROR",
    "channel": "local",
    "extra": {}
}
```

The following are the possible context of the the healthcheck logs:

- `is_database_connected` - Boolean if the database is connected.
- `is_redis_connected` - Boolean if the redis is connected.
- `is_horizon_running` - Boolean if the horizon is running.
- `is_scheduler_running` - Boolean if the scheduler is running.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance52

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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 ~0 days

Total

8

Last Release

337d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/994a22c91a36fee3c57db76ecddab0ab8ea4f15b106714cf2ea77b0d00907828?d=identicon)[alfan06](/maintainers/alfan06)

---

Top Contributors

[![alfan06](https://avatars.githubusercontent.com/u/56281741?v=4)](https://github.com/alfan06 "alfan06 (14 commits)")

### Embed Badge

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

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

###  Alternatives

[adamhopkinson/laravel-model-hash

A trait which automatically generates a unique hash per model instance

2318.7k](/packages/adamhopkinson-laravel-model-hash)

PHPackages © 2026

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