With real-time updates on, the dashboard and order screens react to changes made elsewhere: a new paid order, a status change, a stock adjustment, a new review. They are off by default. Without them every screen works the same, but only shows changes on reload.
Requirements
All of these must be true for a user's screens to subscribe:
realtime.enabledistruein this package's config.- The engine broadcasts admin events:
artisanpack.ecommerce.graphql.subscriptionsistrue. The engine then re-broadcasts order, payment, stock, and review events on the private channelecommerce.adminand registers its authorization. rebing/graphql-laravelis installed. The engine's GraphQL support (and with it the admin broadcasts) is optional, so install it yourself:composer require rebing/graphql-laravel.- Laravel broadcasting is configured with a broadcaster, for example Reverb, and Laravel Echo is set up on
window.Echoin yourresources/js/app.js. - The user passes the channel's check: they hold
order.viewAny,product.viewAny, andwebhookSubscription.viewAny.
If any of these is missing, no listener is registered and the page behaves as if Echo were absent. Nothing errors.
Setup
php artisan install:broadcasting # installs Reverb and Echo
// config/artisanpack/ecommerce-admin-livewire.php
'realtime' => [
'enabled' => true,
],
Then turn on the engine's subscriptions flag (artisanpack.ecommerce.graphql.subscriptions) in the engine's config and rebuild your assets.
The screens use Livewire's echo-private: listeners on private-ecommerce.admin. The engine names its events with broadcastAs(), so the listeners use the leading-dot form, for example echo-private:ecommerce.admin,.orderStatusChanged.
What updates
| Screen | Listens for | What happens |
|---|---|---|
| Dashboard | orderStatusChanged, paymentSucceeded, stockChanged, reviewSubmitted |
Re-renders the widgets and announces what changed |
| Orders index | orderStatusChanged, paymentSucceeded |
Re-renders the list and shows "N new orders since you opened this page" with a Dismiss button |
| Order detail | orderStatusChanged, paymentSucceeded for this order |
Shows "This order was changed elsewhere" with a Reload order button. The page does not replace what you are looking at until you reload. |
The order detail screen re-reads the order from the database before deciding anything. It never trusts the broadcast payload.
Every update is also announced in a polite live region, so screen-reader users hear it without losing their place.
Troubleshooting
If nothing updates:
- Check both config flags. The admin's flag alone does nothing.
- Check
rebing/graphql-laravelis installed. Without it the screens never subscribe, even with both flags on. - Check that
window.Echoexists in the browser console on an admin page. - Check the user holds all three abilities above. A user without
webhookSubscription.viewAnynever subscribes. - Check the broadcaster is running (
php artisan reverb:start) and the queue worker is processing broadcast jobs.

