Beacon

Not yet published to Packagist. Install it from GitHub for now. The examples below are an overview; the docs page has the current API and install steps. Installation instructions

Integration

Beacon for Laravel

Monitor uptime, report incidents, and update component status — all from your Laravel app. One package. Zero config.

$ composer require beacon-status/laravel

Quick Start

Up and running in three steps

1

Install

composer require beacon-status/laravel
2

Configure

Add your credentials to .env

BEACON_API_TOKEN=your-token
BEACON_URL=https://usebeacon.pro
BEACON_PAGE_SLUG=main
3

Publish config

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

Code Examples

Speak fluent Laravel

Report an Incident

Create an incident on your status page from anywhere in your app.

use Beacon\Laravel\Facades\Beacon;

Beacon::createIncident([
    'title'   => 'Database connection errors',
    'impact'  => 'major',
    'state'   => 'investigating',
    'message' => 'Elevated connection timeouts from primary DB.',
]);

Update Component Status

Beacon::updateComponent($componentId, [
    'status' => 'degraded_performance',
]);

Resolve an Incident

Beacon::resolveIncident($incidentId,
    'Database connections restored after failover.'
);

Heartbeat for Scheduled Tasks

// routes/console.php — pings only when the task succeeds
Schedule::command('invoices:process')
    ->hourly()
    ->pingBeacon('invoice-processing-token');

Exception Handler Integration

// In bootstrap/app.php
->withExceptions(function (Exceptions $exceptions) {
    $exceptions->report(function (Throwable $e) {
        if ($e instanceof CriticalDatabaseException) {
            Beacon::createIncident([
                'title'  => 'Critical database failure',
                'impact' => 'critical',
            ]);
        }
    });
})

Reference

Configuration

# .env — publish config/beacon.php with --tag=beacon-config to customise
BEACON_API_TOKEN=bchk_...
BEACON_URL=https://usebeacon.pro          # optional
BEACON_PAGE_SLUG=acme                   # default page for incidents/components
BEACON_WEBHOOK_SECRET=...               # beacon.webhook middleware
BEACON_TIMEOUT=10
BEACON_WEBHOOK_TOLERANCE=300

Features

Built for Laravel developers

Facade or injection

Use the Beacon facade or type-hint Beacon\Beacon.

Webhook middleware

beacon.webhook rejects requests with a bad or stale signature.

Scheduler heartbeats

->pingBeacon($token) on any scheduled task, plus beacon:heartbeat.

Laravel-native config

Publish, customize, and environment-switch as usual.

Supports Laravel 11-13

Built on the framework-agnostic beacon-php client.

Start monitoring your Laravel app

Install the package, add your token, and ship status updates from your codebase.

Also available: Node.js →