artisan-toolbox / axora
Axora delivers real-time notifications to Laravel applications using Server-Sent Events (SSE).
Fund package maintenance!
Requires
- php: ^8.5
- amphp/amp: ^3.1
- amphp/byte-stream: ^2.1
- amphp/http-server: ^3.4
- amphp/pipeline: ^1.2
- amphp/redis: ^2.0
- illuminate/console: ^13.0
- illuminate/cookie: ^13.0
- illuminate/database: ^13.0
- illuminate/encryption: ^13.0
- illuminate/http: ^13.0
- illuminate/redis: ^13.0
- illuminate/support: ^13.0
- psr/log: ^3.0
- revolt/event-loop: ^1.0
Requires (Dev)
- artisan-toolbox/maintainer: ^1.0
- driftingly/rector-laravel: ^2.5
- larastan/larastan: ^3.9
- laravel/pao: ^1.1
- laravel/pint: ^1.29
- orchestra/testbench: ^11.0
- pestphp/pest: ^5.0
- pestphp/pest-plugin-laravel: ^5.0
- pestphp/pest-plugin-type-coverage: ^5.0
- phpstan/extension-installer: ^1.4
- rector/rector: ^2.6.2
README
Axora
Axora delivers transient, named JSON events to Laravel browser sessions over Server-Sent Events. Its standalone asynchronous daemon holds browser connections without occupying PHP-FPM workers and briefly buffers events that arrive just before a session connects.
Requirements
- PHP 8.5 or later
- Laravel 13
- Redis
- A same-origin reverse proxy and process supervisor in production
Installation
composer require artisan-toolbox/axora
Register the Composer-installed TypeScript client in the application's package.json, then run npm install:
{
"dependencies": {
"@artisan-toolbox/axora": "file:vendor/artisan-toolbox/axora"
}
}
Start the standalone server:
php artisan axora:start
Minimal usage
Send an event to the current Laravel session:
axora()->send('toast', [ 'type' => 'success', 'message' => 'Saved.', ]);
Initialize one browser connection and subscribe to the event:
import { axora, initializeAxora } from "@artisan-toolbox/axora"; axora.on("toast", ({ type, message }) => { showToast(type, message); }); initializeAxora();
The complete setup, TypeScript event map, Vue composable, queued user delivery, configuration, deployment, and troubleshooting guides are available in the Axora documentation.
Stability
Axora is pre-release software. Backward compatibility is not guaranteed until 1.0.