Integration
Monitor uptime, report incidents, and update component status — all from your Laravel app. One package. Zero config.
$ composer require beacon-status/laravel
Quick Start
composer require beacon-status/laravel
Add your credentials to .env
BEACON_API_TOKEN=your-token
BEACON_BASE_URL=https://api.beacon.example.com
BEACON_PAGE_SLUG=main
php artisan vendor:publish --tag=beacon-config
Code Examples
Create an incident on your status page from anywhere in your app.
use BeaconStatus\Laravel\Facades\Beacon;
Beacon::createIncident([
'title' => 'Database connection errors',
'impact' => 'major',
'state' => 'investigating',
'message' => 'Elevated connection timeouts from primary DB.',
]);
Beacon::updateComponent($componentId, [
'status' => 'degraded',
]);
Beacon::resolveIncident($incidentId,
'Database connections restored after failover.'
);
// In your scheduler
$schedule->command('invoices:process')
->hourly()
->after(function () {
Beacon::heartbeat('invoice-processing-token');
});
// 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
// config/beacon.php
return [
/*
|--------------------------------------------------------------------------
| API Token
|--------------------------------------------------------------------------
|
| Your Beacon API token. Generate one from the workspace settings page.
|
*/
'token' => env('BEACON_API_TOKEN'),
/*
|--------------------------------------------------------------------------
| Base URL
|--------------------------------------------------------------------------
|
| The base URL of your Beacon instance API.
|
*/
'base_url' => env('BEACON_BASE_URL', 'https://api.beacon.example.com'),
/*
|--------------------------------------------------------------------------
| Page Slug
|--------------------------------------------------------------------------
|
| The default status page slug to use for API calls.
|
*/
'page_slug' => env('BEACON_PAGE_SLUG', 'main'),
/*
|--------------------------------------------------------------------------
| Queue
|--------------------------------------------------------------------------
|
| Send API calls via queue for non-blocking operation. Set to false
| to send synchronously.
|
*/
'async' => env('BEACON_ASYNC', true),
/*
|--------------------------------------------------------------------------
| Retries
|--------------------------------------------------------------------------
|
| Number of times to retry a failed API call before giving up.
|
*/
'retries' => env('BEACON_RETRIES', 3),
];
Features
Facade + helper function
Use Beacon::method() or the beacon() helper — your call.
Queue-friendly
Async by default. API calls are dispatched to your queue.
Automatic retries
Transient failures are retried with exponential backoff.
Laravel-native config
Publish, customize, and environment-switch as usual.
Supports Laravel 10-13
Tested across all current LTS and active releases.
Install the package, add your token, and ship status updates from your codebase.
Also available: Node.js →
We use essential cookies for sign-in and security. Cookie policy