Laravel · Real-time

Livewire 3 + Reverb Real-Time Patterns

Livewire handles interaction round trips, but not server-pushed updates. Laravel Reverb — a first-party WebSocket server — is what adds true real-time to a Livewire app.

John Kihiu12 min read

Livewire's model is request-driven: interactivity happens when the user does something. It has no way, on its own, to push an update from the server when data changes elsewhere — a new message, another user's edit, a job completing. That needs WebSockets, and Laravel Reverb is Laravel's own first-party WebSocket server that fills the gap, letting a Livewire app receive server-pushed real-time updates.

What Reverb provides

Reverb is a WebSocket server built for Laravel, an alternative to third-party services like Pusher or self-hosting a separate solution. It integrates with Laravel's broadcasting system, so you keep the familiar events-and-channels model and simply run Reverb as the server that delivers them. Being first-party, it fits the ecosystem cleanly and removes the dependency on an external real-time service, which matters for cost and data control.

Broadcasting events

The flow uses Laravel's existing broadcasting: you dispatch an event marked to broadcast, and Reverb delivers it over WebSockets to clients subscribed to the relevant channel. Use private and presence channels with authorisation so users only receive events they are allowed to — the same broadcasting authorisation you would use with any driver:

PHP · a broadcastable event
class MessageSent implements ShouldBroadcast
{
    public function __construct(public Message $message) {}

    public function broadcastOn(): array
    {
        return [new PrivateChannel('conversation.'.$this->message->conversation_id)];
    }
}
// event(new MessageSent($message));  -> delivered over Reverb

Updating Livewire live

Livewire 3 can listen for broadcast events and react to them, so a component updates itself when a server-pushed event arrives — no user interaction required. That is what completes the picture: Livewire handles user-driven interactivity, and Reverb-delivered broadcasts handle server-driven updates. Together they give a Livewire app genuine real-time behaviour — live chat, notifications, collaborative updates — while you stay in Laravel and PHP.

Real-time is infrastructure, not just code

A WebSocket server is a long-running, stateful process — different from your stateless web app. Reverb needs to run and be supervised as its own process, scaled for concurrent connections, and fronted correctly for WebSocket traffic. Budget for running and monitoring it as infrastructure, not just wiring up events; the code is the easy half of adding real-time.

Laravel Reverb adds the server-push capability Livewire lacks: a first-party WebSocket server that delivers Laravel broadcast events to subscribed clients, which Livewire 3 components can listen for and react to live. Together they give a Livewire app real-time features without leaving the ecosystem — just remember Reverb is a stateful process to run and scale as real infrastructure, which is where the operational work actually lives.

John Kihiu
Acumatica ERP Developer · Laravel Engineer

Independent software engineer in Nairobi specialising in Acumatica customisations, Laravel backends, and tax fiscalisation integrations across East and Southern Africa.