Search by

autoheal / laravel-sdk

alimrun

Reports exceptions, error logs, deployments, heartbeats and health checks from a Laravel application to AutoHeal.

v0.1.0 2026-11-13 11:07 UTC

This package is auto-updated.

Last update: 2026-11-13 11:37:09 UTC


README

Reports a Laravel application's exceptions, error logs, deployments, heartbeats and health checks to AutoHeal. It also offers a cache hook the AutoHeal agent can call during recovery. It is built so that AutoHeal can never slow the application down, break it or leak its secrets.

Requirements

PHP 8.3 or later, and Laravel 11, 12 or 13.

Install

composer require autoheal/laravel-sdk

Quick start

Set AUTOHEAL_ENDPOINT and AUTOHEAL_KEY in .env. The key comes from the environment's page in the AutoHeal dashboard. Without both, the SDK does nothing.

AUTOHEAL_ENDPOINT=https://autoheal.example.com/api/v1
AUTOHEAL_KEY=<your SDK key>

Check the connection:

php artisan autoheal:test

Exceptions and error logs now reach AutoHeal. Deployments, heartbeats and health checks are shown below and in Events and commands.

Documentation

Optional variables, heartbeats, deployments and health checks

Optional variables: AUTOHEAL_RELEASE, AUTOHEAL_SERVICE, AUTOHEAL_TRANSPORT (http or queue), AUTOHEAL_LOG_LEVEL (default error) and AUTOHEAL_ENABLED. To change other defaults, publish the configuration:

php artisan vendor:publish --tag=autoheal-config

Send a heartbeat from the scheduler:

// routes/console.php
Schedule::command('autoheal:heartbeat scheduler --every=60')->everyMinute();

Report deployments and health checks from a pipeline or your own checks:

php artisan autoheal:deploy 2026.11.06-1 --source=github-actions
php artisan autoheal:health database degraded --latency=840

License

MIT. See LICENSE.